==> Building on minun ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list ./ PKGBUILD 2,218 100% 0.00kB/s 0:00:00 2,218 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=6/8) config 303 100% 295.90kB/s 0:00:00 303 100% 295.90kB/s 0:00:00 (xfr#2, to-chk=5/8) gnutls-3.8.1-2.log 322 100% 314.45kB/s 0:00:00 322 100% 314.45kB/s 0:00:00 (xfr#3, to-chk=4/8) 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#4, to-chk=1/8) keys/pgp/5D46CB0F763405A7053556F47A75A648B3F9220C.asc 669 100% 653.32kB/s 0:00:00 669 100% 653.32kB/s 0:00:00 (xfr#5, to-chk=0/8) sent 5,593 bytes received 126 bytes 3,812.67 bytes/sec total size is 7,337 speedup is 1.28 ==> Ensuring required PGP keys are present...  -> Checking for 462225C3B46F34879FC8496CD605848ED7E69871... ==> Applying RISC-V patches... sending incremental file list ./ riscv64.patch 282 100% 0.00kB/s 0:00:00 282 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=0/2) sent 288 bytes received 38 bytes 217.33 bytes/sec total size is 282 speedup is 0.87 patching file PKGBUILD Hunk #1 succeeded at 44 (offset 1 line). ==> Patching arch to riscv64... ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l root29 on remote host... [?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... there is nothing to do [?25h==> Building in chroot for [extra] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [root29]...done ==> Making package: gnutls 3.8.1-2 (Sat Sep 30 16:01:20 2023) ==> Retrieving sources...  -> Downloading gnutls-3.8.1.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 --:--:-- --:--:-- --:--:-- 0 100 6295k 100 6295k 0 0 11.3M 0 --:--:-- --:--:-- --:--:-- 11.4M  -> Downloading gnutls-3.8.1.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 4424 0 --:--:-- --:--:-- --:--:-- 4448  -> Found config ==> Validating source files with sha256sums... gnutls-3.8.1.tar.xz ... Passed gnutls-3.8.1.tar.xz.sig ... Skipped config ... Passed ==> Verifying source file signatures with gpg... gnutls-3.8.1.tar.xz ... Passed ==> Making package: gnutls 3.8.1-2 (Sat Sep 30 16:01:30 2023) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (2) New Version Net Change core/net-tools 2.10-2 0.43 MiB extra/tpm2-tools 5.3-2 1.37 MiB Total Installed Size: 1.80 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing net-tools... installing tpm2-tools... Optional dependencies for tpm2-tools tpm2-abrmd: user space resource manager [?25h==> Retrieving sources...  -> Found gnutls-3.8.1.tar.xz  -> Found gnutls-3.8.1.tar.xz.sig  -> Found config ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting gnutls-3.8.1.tar.xz with bsdtar ==> 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 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 whether make supports nested variables... (cached) yes *** *** 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 C11 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 sys/param.h... yes checking for sys/time.h... yes checking for netdb.h... yes checking for netinet/in.h... yes checking for limits.h... yes checking for threads.h... yes checking for sys/mman.h... yes checking for stdbool.h... yes checking for stdckdint.h... no checking for sys/uio.h... yes checking for crtdefs.h... no checking for error.h... yes checking for stdio_ext.h... yes checking for termios.h... yes checking for sys/select.h... yes checking for langinfo.h... yes checking for xlocale.h... no checking for semaphore.h... yes checking for sys/wait.h... yes checking for pthread.h... yes checking for sys/cdefs.h... yes checking for sys/ioctl.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 grep that handles long lines and -e... /usr/bin/grep checking for egrep... /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 _LARGEFILE_SOURCE value needed for large files... no checking for gcc option to enable large file support... 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 for g++ option to enable C++11 features... none needed 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... 1696082531 ./configure: line 11540: 2006-09-23 00:00:00: command not found ./configure: line 11540: test: =: unary operator expected no checking for inline... inline checking for egrep... (cached) /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... -latomic 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... yes checking for HOGWEED... yes checking for __gmpz_cmp in -lgmp... yes checking for LIBTASN1... yes checking whether to use the included minitasn1... no checking whether C99 macros are supported... yes 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 for linux/tls.h... yes checking whether to disable OCSP 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... no configure: WARNING: You will not be able to create source packages with 'make dist' because gtk-doc >= 1.14 is not found. checking for gtkdoc-check... no checking for gtkdoc-check... no checking for gtkdoc-rebase... no checking for gtkdoc-mkpdf... no checking whether to build gtk-doc documentation... no checking for GTKDOC_DEPS... 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 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 lstat correctly handles trailing slash... 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 mprotect... yes checking for memset_explicit... no 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 getpass... yes checking for getexecname... no checking for setenv... yes checking for __xpg_strerror_r... yes 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 gcc options needed to detect all undeclared functions... none needed 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 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 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 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 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 imported symbols can be declared weak... yes checking for pthread.h... (cached) yes checking for pthread_kill in -lpthread... yes checking whether POSIX threads API is available... yes checking for multithread API to use... posix checking whether malloc is ptrdiff_t safe... yes checking whether malloc, realloc, calloc set errno on failure... yes checking whether malloc (0) returns nonnull... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking whether memchr works... yes 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 whether snprintf returns a byte count as in C99... yes checking whether snprintf is declared... yes checking for wchar_t... yes checking for good max_align_t... yes checking whether NULL can be used in arbitrary expressions... yes 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 strdup is declared... yes 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 where to find the exponent in a 'double'... word 1 bit 20 checking whether snprintf truncates the result as in C99... yes checking for snprintf... (cached) yes checking for strnlen... yes checking for wcslen... yes checking for wcsnlen... yes checking for mbrtowc... yes checking for wcrtomb... 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 C++ compiler option to allow warnings... -Wno-error checking for alignas and alignof... yes, macros checking for alloca as a compiler built-in... yes checking for static_assert... yes, an macro checking for __builtin_expect... yes checking for byteswap.h... 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 conversion from 'int' to 'long double' works... yes checking whether fopen recognizes a trailing slash... 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 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 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 for pthread_rwlock_t... yes checking whether pthread_rwlock_rdlock prefers a writer to a reader... no checking whether lseek detects pipes... yes checking for memmem... yes checking whether memmem works... yes checking for mempcpy... yes checking for explicit_memset... no checking whether is self-contained... yes checking whether open recognizes a trailing slash... yes checking for pmccabe... false 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 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 whether printf supports POSIX/XSI format strings with positions... 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 bool, true, false... no checking for stpcpy... yes checking for strcasecmp... yes checking for strncasecmp... 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 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... yes checking for vsnprintf... yes checking whether snprintf respects a size of 1... (cached) yes checking whether printf supports POSIX/XSI format strings with positions... (cached) 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 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 whether struct tm is in sys/time.h or time.h... time.h checking for struct tm.tm_zone... yes checking for struct tm.tm_gmtoff... yes checking for compound literals... yes checking whether is self-contained... yes checking whether setenv is declared... yes checking for search.h... yes checking for tsearch... yes checking for sigset_t... yes checking for uid_t in sys/types.h... 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 nl_langinfo and CODESET... yes checking whether getcwd (NULL, 0) allocates memory for result... yes checking for getcwd with POSIX signature... yes checking for off_t... yes checking whether langinfo.h defines CODESET... yes checking whether langinfo.h defines T_FMT_AMPM... yes checking whether langinfo.h defines ALTMON_1... yes checking whether langinfo.h defines ERA... yes checking whether langinfo.h defines YESEXPR... yes checking whether locale.h defines locale_t... yes checking whether locale.h conforms to POSIX:2001... yes checking whether struct lconv is properly defined... yes checking for LC_MESSAGES... yes checking for uselocale... yes checking whether uselocale works... yes checking for fake locale system (OpenBSD)... no checking for Solaris 11.4 locale system... no checking for getlocalename_l... no checking for library needed for semaphore functions... none checking for pthread_t... yes checking for pthread_spinlock_t... yes 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 for sched.h... yes checking for struct sched_param... yes checking whether setlocale (LC_ALL, NULL) is multithread-safe... yes checking whether setlocale (category, NULL) is multithread-safe... yes checking whether declares ioctl... yes checking for alignas and alignof... (cached) yes, macros checking for alloca as a compiler built-in... (cached) yes checking for static_assert... (cached) yes, an macro checking for __builtin_expect... (cached) yes checking for byteswap.h... (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... (cached) 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 conversion from 'int' to 'long double' works... (cached) yes checking whether fopen recognizes a trailing slash... (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 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 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_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 whether the compiler supports the __inline keyword... (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 malloc (0) returns nonnull... (cached) yes checking for memmem... (cached) yes checking whether memmem works... (cached) yes checking for mempcpy... (cached) yes checking for explicit_memset... (cached) no 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 for struct tm.tm_zone... (cached) yes checking whether program_invocation_name is declared... (cached) yes checking whether program_invocation_short_name is declared... (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 (0, 0) returns nonnull... yes 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 whether printf supports POSIX/XSI format strings with positions... (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 bool, true, false... (cached) no checking for stpcpy... (cached) yes checking for strcasecmp... (cached) yes checking for strncasecmp... (cached) yes checking whether strncasecmp is declared... (cached) yes checking for working strerror function... 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 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 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 printf supports POSIX/XSI format strings with positions... (cached) yes checking for stdint.h... (cached) yes checking for atoll... yes checking for a traditional french locale... none checking for a turkish Unicode locale... none checking whether fdopen sets errno... yes checking for ftruncate... yes checking for getpagesize... yes checking whether getpagesize 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 for newlocale... yes checking for newlocale... (cached) yes checking for duplocale... yes checking for freelocale... yes checking for newlocale... (cached) 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 whether pthread_create exists as a global function... 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 whether pthread_sigmask unblocks signals correctly... guessing yes checking for putenv compatible with GNU and SVID... yes checking for raise... yes checking for sigprocmask... yes checking whether sched_yield is declared... yes checking whether setlocale supports the C locale... yes checking whether setlocale (LC_ALL, NULL) is multithread-safe... (cached) yes checking whether setlocale (category, NULL) is multithread-safe... (cached) yes checking for a traditional french locale... (cached) none checking for a french Unicode locale... none checking for a traditional japanese locale... none checking for a transitional chinese locale... none checking for sigprocmask... (cached) yes checking whether sleep is declared... yes checking for working sleep... yes checking for catgets... yes checking for strtoll... yes checking whether strtoll works... yes checking whether symlink handles trailing slash correctly... yes checking for pthread_atfork... yes checking for sys/single_threaded.h... yes checking for useconds_t... yes checking whether usleep allows large arguments... yes checking whether the compiler generally respects inline... yes checking for ssize_t... (cached) yes checking for bool, true, false... (cached) no checking for a Python interpreter with version >= 3.6... none 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 supported... 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 -fno-common... 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 -Wdisabled-optimization... 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 -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-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 -Wsuggest-final-methods... yes checking whether C compiler handles -Wsuggest-final-types... 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 -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 for ranlib... (cached) ranlib 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 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... no checking for LIBIDN2... yes checking for nettle_get_secp_192r1 in -lhogweed... yes checking for nettle_rsa_sec_decrypt... yes checking for nettle_gost28147_set_key... no checking for nettle_streebog512_update... yes 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.8 checking hogweed soname... libhogweed.so.6 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... yes checking for TSS2... 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 whether to include zlib compression support... yes checking for libz... yes checking how to link with libz... /usr/lib/libz.so checking whether to include brotli compression support... yes checking for LIBBROTLIENC... yes checking for LIBBROTLIDEC... yes checking whether to include zstd compression support... yes checking for LIBZSTD... 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/x509/Makefile config.status: creating lib/unistring/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/POTFILES config.status: creating po/Makefile config.status: executing libtool commands configure: summary of build options: version: 3.8.1 shared 66:0:36 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=2 -Wformat -Werror=format-security -fstack-clash-protection -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: yes 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 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: /etc/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.1' Making all in gl make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/gl' GEN alloca.h GEN arpa/inet.h GEN inttypes.h GEN fcntl.h GEN limits.h GEN malloc/scratch_buffer.gl.h GEN netdb.h GEN stdckdint.h GEN strings.h GEN sys/stat.h GEN sys/socket.h GEN stdio.h GEN stdlib.h GEN sys/time.h GEN string.h GEN sys/types.h GEN sys/uio.h GEN time.h GEN unistd.h GEN wchar.h make all-recursive make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/gl' make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/gl' CC libgnu_la-c-ctype.lo CC libgnu_la-basename-lgpl.lo CC libgnu_la-c-strncasecmp.lo CC libgnu_la-bitrotate.lo CC libgnu_la-c-strcasecmp.lo CC libgnu_la-fd-hook.lo CC libgnu_la-dirname-lgpl.lo CC libgnu_la-cloexec.lo CC libgnu_la-stripslash.lo CC libgnu_la-fcntl.lo CC libgnu_la-hash.lo CC libgnu_la-hash-pjw-bare.lo CC libgnu_la-gl_linkedhash_list.lo CC libgnu_la-gl_list.lo CC libgnu_la-memset_explicit.lo CC libgnu_la-malloca.lo CC libgnu_la-read-file.lo CC libgnu_la-stat-time.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-xsize.lo CC asnprintf.lo CC printf-args.lo CC printf-parse.lo CC 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 CCLD libgnu.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/gl' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/gl' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/gl' Making all in lib make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib' make all-recursive make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib' Making all in includes make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/includes' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/includes' Making all in x509 make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/x509' make all-am make[5]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/x509' CC common.lo CC key_decode.lo CC time.lo CC crl.lo CC crl_write.lo CC dn.lo CC crq.lo CC attributes.lo CC key_encode.lo CC prov-seed.lo CC extensions.lo CC mpi.lo CC pkcs12_encr.lo CC output.lo CC pkcs12.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.1/lib/x509' make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/x509' Making all in auth make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/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 srp_passwd.lo CC srp_kx.lo CC rsa.lo CC srp_sb64.lo CC srp_rsa.lo CC ecdhe.lo CC anon_ecdh.lo CC vko_gost.lo CCLD libgnutls_auth.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/auth' Making all in ext make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/ext' CC signature.lo CC srp.lo CC session_ticket.lo CC heartbeat.lo CC max_record.lo CC server_name.lo CC safe_renegotiation.lo CC status_request.lo CC dumbfw.lo CC etm.lo CC cookie.lo CC ext_master_secret.lo CC supported_versions.lo CC post_handshake.lo CC psk_ke_modes.lo CC key_share.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.1/lib/ext' Making all in algorithms make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/algorithms' CC cert_types.lo CC ciphersuites.lo CC ecc.lo CC kx.lo CC mac.lo CC protocols.lo CC ciphers.lo CC publickey.lo CC sign.lo CC secparams.lo CC groups.lo CCLD libgnutls_alg.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/algorithms' Making all in extras make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/extras' CC randomart.lo CC hex.lo CCLD libgnutls_extras.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/extras' Making all in accelerated make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/accelerated' make[5]: Entering directory '/build/gnutls/src/gnutls-3.8.1/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.1/lib/accelerated' make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/accelerated' Making all in nettle make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/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-validate.lo CC int/tls1-prf.lo CC int/dsa-compute-k.lo CC int/dsa-keygen-fips186.lo CC int/ecdsa-compute-k.lo CC int/mpn-base256.lo CC int/rsa-pad.lo CC gost/gost28147.lo CC gost/write-le32.lo CC gost/gost-wrap.lo CC gost/streebog.lo CC gost/streebog-meta.lo CC gost/hmac-streebog.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 CCLD libcrypto.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/nettle' make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib' CC range.lo CC debug.lo CC record.lo CC cipher.lo CC buffers.lo CC compress.lo CC mbuffers.lo CC handshake.lo CC handshake-tls13.lo CC dh.lo CC errors.lo CC priority.lo CC hash_int.lo CC kx.lo CC cipher-cbc.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 cert-cred.lo CC global.lo CC constate.lo CC anon_cred.lo CC pkix_asn1_tab.lo CC mem.lo CC gnutls_asn1_tab.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-unicode.lo CC str-idna.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 openpgp_compat.lo CC dh-primes.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 system/ktls.lo CC pathbuf.lo CC vko.lo CC tpm2.lo CC tpm2_esys.lo CC system/keys-dummy.lo CC tls13-sig.lo CC tls13/finished.lo CC tls13/key_update.lo CC tls13/hello_retry.lo CC tls13/session_ticket.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 CC pkcs11.lo CC pkcs11x.lo CC pkcs11_privkey.lo CC pkcs11_write.lo CC pkcs11_secret.lo CC pkcs11_int.lo CC srp.lo CC psk.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 tls13/encrypted_extensions.lo CC tls13/certificate_request.lo CC tls13/certificate_verify.lo CCLD libgnutls.la CXXLD libgnutlsxx.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib' Making all in extra make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/extra' Making all in includes make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/extra/includes' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/extra/includes' make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/extra' CC gnutls_openssl.lo CC openssl_compat.lo CCLD libgnutls-openssl.la /usr/bin/nm: libgnu_la-fd-hook.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 make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/extra' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/extra' Making all in po make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/po' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/po' Making all in src/gl make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl' GEN alloca.h GEN arpa/inet.h GEN fcntl.h GEN malloc/scratch_buffer.gl.h GEN inttypes.h GEN limits.h GEN netdb.h GEN signal.h GEN stdckdint.h GEN stdio.h GEN stdlib.h GEN string.h GEN strings.h GEN sys/select.h GEN sys/stat.h GEN sys/socket.h GEN sys/time.h GEN sys/uio.h GEN sys/types.h GEN time.h GEN unistd.h GEN wchar.h make all-recursive make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl' Making all in . make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl' CC libgnu_gpl_la-basename-lgpl.lo CC libgnu_gpl_la-bitrotate.lo CC libgnu_gpl_la-c-ctype.lo CC libgnu_gpl_la-c-strcasecmp.lo CC libgnu_gpl_la-cloexec.lo CC libgnu_gpl_la-close-stream.lo CC libgnu_gpl_la-c-strncasecmp.lo CC libgnu_gpl_la-exitfail.lo CC libgnu_gpl_la-fcntl.lo CC libgnu_gpl_la-fd-hook.lo CC libgnu_gpl_la-getprogname.lo CC libgnu_gpl_la-gettime.lo CC libgnu_gpl_la-hash.lo CC libgnu_gpl_la-hash-pjw-bare.lo CC libgnu_gpl_la-ialloc.lo CC libgnu_gpl_la-gl_linked_list.lo CC libgnu_gpl_la-gl_linkedhash_list.lo CC libgnu_gpl_la-gl_list.lo CC libgnu_gpl_la-malloca.lo CC libgnu_gpl_la-memset_explicit.lo CC libgnu_gpl_la-nstrftime.lo CC libgnu_gpl_la-parse-datetime.lo CC libgnu_gpl_la-progname.lo CC libgnu_gpl_la-read-file.lo CC libgnu_gpl_la-sockets.lo CC libgnu_gpl_la-stat-time.lo CC libgnu_gpl_la-sys_socket.lo CC glthread/libgnu_gpl_la-threadlib.lo CC libgnu_gpl_la-time_rz.lo CC libgnu_gpl_la-timespec.lo CC glthread/libgnu_gpl_la-tls.lo CC libgnu_gpl_la-unistd.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 asnprintf.lo CC mktime.lo CC printf-args.lo CC printf-parse.lo CC 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 CCLD libgnu_gpl.la make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl' Making all in tests make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' ## ---------------------------------------------------- ## GEN ctype.h GEN langinfo.h GEN locale.h GEN pthread.h GEN sched.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.1/src/gl/tests' Making all in . make[6]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[6]: Nothing to be done for 'all-am'. make[6]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[5]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl' Making all in src make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src' make all-am make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src' CC psk.o CC psktool-options.lo CC cli-debug.o CC tests.o CC socket.o CC common.o CC certtool.o CC gnutls-cli-debug-options.lo CC certtool-common.o CC certtool-options.lo CC certtool-extras.o CC certtool-cfg.lo CC cfg.lo CC udp-serv.o CC serv.o CC gnutls-serv-options.lo serv.c: In function 'terminate': serv.c:1139:9: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result] 1139 | write(STDERR_FILENO, buf, p - buf); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 CCLD libcmd-psk.la CCLD libcmd-cli-debug.la CCLD libcmd-serv.la CCLD libcerttool-cfg.la CCLD libcmd-ocsp.la CCLD dumpcfg CCLD libcmd-cli.la CCLD psktool CCLD gnutls-cli-debug CCLD gnutls-serv CCLD ocsptool copying selected object files to avoid basename conflicts... CCLD gnutls-cli CCLD libcmd-certtool.la CCLD libcmd-p11tool.la CCLD libcmd-systemkey.la CCLD libcmd-danetool.la 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.c: In function 'yyparse': gl/parse-datetime.c:1715:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1715 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1510 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (10) region created on stack here | | (11) capacity: 56 bytes |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (12) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (14) following 'false' branch (when 'yystate_207 != 12')... | | (13) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (15) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (16) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (18) following 'true' branch (when 'yychar_194 == -2')... | | (17) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (19) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (20) calling 'yylex' from 'yyparse' | +--> 'yylex': events 21-22 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (21) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (22) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 23-24 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (23) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (24) ...to here | <-------------+ | 'yyparse': events 25-32 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (25) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (26) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (27) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (28) following 'false' branch (when 'yyn_245 > 0')... |...... | 1708 | if (yyerrstatus) | | ~ ~ | | | | | | | (30) following 'false' branch (when 'yyerrstatus_210 == 0')... | | (29) ...to here |...... | 1712 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | | ~ | | | | | (31) ...to here |...... | 1715 | *++yyvsp = yylval; | | ~ | | | | | (32) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (17) following 'true' branch (when 'yychar_194 == -2')... | | (16) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (18) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (19) calling 'yylex' from 'yyparse' | +--> 'yylex': events 20-21 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (20) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (21) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 22-23 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (22) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (23) ...to here | <-------------+ | 'yyparse': events 24-29 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (24) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (25) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (26) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (27) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (28) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (29) use of uninitialized value '*_15' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 600 | pc->seconds = $2; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 738 | { pc->local_isdst = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 750 | { pc->time_zone = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 754 | { pc->time_zone = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 767 | { pc->time_zone = $1 + 60 * 60; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 769 | { pc->time_zone = $1 + 60 * 60; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | pc->day_number = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | pc->day_number = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | pc->day_ordinal = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 791 | pc->day_ordinal = $1.value; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 800 | pc->month = $1.value; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 810 | if (4 <= $1.digits) | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (20) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (48) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (72) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 839 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 854 | pc->month = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 859 | pc->month = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 865 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 870 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 881 | pc->year = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value '_136->rel' here | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1715:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1715 | *++yyvsp = yylval; | ^ gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1510 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (10) region created on stack here | | (11) capacity: 56 bytes |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (12) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (14) following 'false' branch (when 'yystate_207 != 12')... | | (13) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (15) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (16) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (18) following 'true' branch (when 'yychar_194 == -2')... | | (17) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (19) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (20) calling 'yylex' from 'yyparse' | +--> 'yylex': events 21-22 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (21) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (22) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 23-24 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (23) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (24) ...to here | <-------------+ | 'yyparse': events 25-32 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (25) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (26) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (27) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (28) following 'false' branch (when 'yyn_245 > 0')... |...... | 1708 | if (yyerrstatus) | | ~ ~ | | | | | | | (30) following 'false' branch (when 'yyerrstatus_210 == 0')... | | (29) ...to here |...... | 1712 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | | ~ | | | | | (31) ...to here |...... | 1715 | *++yyvsp = yylval; | | ~ | | | | | (32) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (17) following 'true' branch (when 'yychar_194 == -2')... | | (16) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (18) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (19) calling 'yylex' from 'yyparse' | +--> 'yylex': events 20-21 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (20) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (21) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 22-23 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (22) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (23) ...to here | <-------------+ | 'yyparse': events 24-29 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (24) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (25) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (26) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (27) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (28) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (29) use of uninitialized value '*_15' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 600 | pc->seconds = $2; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->timespec' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 738 | { pc->local_isdst = $1; } | ^ gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 750 | { pc->time_zone = $1; } | ^ gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 754 | { pc->time_zone = $1; | ^ gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 767 | { pc->time_zone = $1 + 60 * 60; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 769 | { pc->time_zone = $1 + 60 * 60; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | pc->day_number = $1; | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | pc->day_number = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | pc->day_ordinal = $1; | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 791 | pc->day_ordinal = $1.value; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 800 | pc->month = $1.value; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 810 | if (4 <= $1.digits) | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (20) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (48) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (72) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 839 | pc->day = $1.value; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1; | ^ gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 854 | pc->month = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 859 | pc->month = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 865 | pc->day = $1.value; | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 981 | { digits_to_date_time (pc, $1); } | ^ gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 989 | digits_to_date_time (pc, $1); | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (21) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 870 | pc->day = $1.value; | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (49) use of uninitialized value '_176->textintval' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (73) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | { $$ = $2.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 881 | pc->year = $1; | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 981 | { digits_to_date_time (pc, $1); } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 989 | digits_to_date_time (pc, $1); | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (21) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (49) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (73) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | { $$ = $2.value; } | ^ 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1715:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1715 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1510 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (10) region created on stack here | | (11) capacity: 56 bytes |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (12) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (14) following 'false' branch (when 'yystate_207 != 12')... | | (13) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (15) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (16) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (18) following 'true' branch (when 'yychar_194 == -2')... | | (17) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (19) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (20) calling 'yylex' from 'yyparse' | +--> 'yylex': events 21-22 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (21) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (22) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 23-24 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (23) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (24) ...to here | <-------------+ | 'yyparse': events 25-32 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (25) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (26) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (27) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (28) following 'false' branch (when 'yyn_245 > 0')... |...... | 1708 | if (yyerrstatus) | | ~ ~ | | | | | | | (30) following 'false' branch (when 'yyerrstatus_210 == 0')... | | (29) ...to here |...... | 1712 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | | ~ | | | | | (31) ...to here |...... | 1715 | *++yyvsp = yylval; | | ~ | | | | | (32) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-14 | | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (10) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (11) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (12) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (13) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (14) use of uninitialized value '*_15' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (17) following 'true' branch (when 'yychar_194 == -2')... | | (16) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (18) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (19) calling 'yylex' from 'yyparse' | +--> 'yylex': events 20-21 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (20) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (21) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 22-23 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (22) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (23) ...to here | <-------------+ | 'yyparse': events 24-29 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (24) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (25) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (26) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (27) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (28) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (29) use of uninitialized value '*_15' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 600 | pc->seconds = $2; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 738 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 750 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 754 | { pc->time_zone = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 767 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 769 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | pc->day_number = $1; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | pc->day_number = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 791 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 800 | pc->month = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 810 | if (4 <= $1.digits) | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (9) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (20) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (27) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (48) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (72) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 839 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 854 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 859 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 865 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 870 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 881 | pc->year = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1715:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1715 | *++yyvsp = yylval; | ^ 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1510 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (10) region created on stack here | | (11) capacity: 56 bytes |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (12) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (14) following 'false' branch (when 'yystate_207 != 12')... | | (13) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (15) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (16) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (18) following 'true' branch (when 'yychar_194 == -2')... | | (17) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (19) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (20) calling 'yylex' from 'yyparse' | +--> 'yylex': events 21-22 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (21) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (22) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 23-24 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (23) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (24) ...to here | <-------------+ | 'yyparse': events 25-32 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (25) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (26) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (27) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (28) following 'false' branch (when 'yyn_245 > 0')... |...... | 1708 | if (yyerrstatus) | | ~ ~ | | | | | | | (30) following 'false' branch (when 'yyerrstatus_210 == 0')... | | (29) ...to here |...... | 1712 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | | ~ | | | | | (31) ...to here |...... | 1715 | *++yyvsp = yylval; | | ~ | | | | | (32) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-14 | | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (10) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (11) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (12) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (13) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (14) use of uninitialized value '*_15' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (17) following 'true' branch (when 'yychar_194 == -2')... | | (16) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (18) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (19) calling 'yylex' from 'yyparse' | +--> 'yylex': events 20-21 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (20) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (21) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 22-23 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (22) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (23) ...to here | <-------------+ | 'yyparse': events 24-29 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (24) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (25) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (26) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (27) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (28) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (29) use of uninitialized value '*_15' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 600 | pc->seconds = $2; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_67->textintval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 738 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 750 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 754 | { pc->time_zone = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 767 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 769 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | pc->day_number = $1; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) 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]' gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | pc->day_number = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) 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]' gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | pc->day_ordinal = $1; | ^ gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 981 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 791 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 989 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (10) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (21) use of uninitialized value '_176->textintval' here | 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (28) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 800 | pc->month = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (49) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (73) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | { $$ = $2.value; } | ^ gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 810 | if (4 <= $1.digits) | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (9) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (20) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (27) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (48) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (72) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 839 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 854 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 859 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 865 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 870 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 881 | pc->year = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -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-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 981 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 989 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (10) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (21) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (28) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (49) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (73) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | { $$ = $2.value; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | cli.c: In function 'try_resume': 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.c: In function 'yyparse': gl/parse-datetime.c:1715:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1715 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1510 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (10) region created on stack here | | (11) capacity: 56 bytes |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (12) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (14) following 'false' branch (when 'yystate_207 != 12')... | | (13) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (15) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (16) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (18) following 'true' branch (when 'yychar_194 == -2')... | | (17) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (19) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (20) calling 'yylex' from 'yyparse' | +--> 'yylex': events 21-22 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (21) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (22) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 23-24 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (23) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (24) ...to here | <-------------+ | 'yyparse': events 25-32 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (25) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (26) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (27) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (28) following 'false' branch (when 'yyn_245 > 0')... |...... | 1708 | if (yyerrstatus) | | ~ ~ | | | | | | | (30) following 'false' branch (when 'yyerrstatus_210 == 0')... | | (29) ...to here |...... | 1712 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | | ~ | | | | | (31) ...to here |...... | 1715 | *++yyvsp = yylval; | | ~ | | | | | (32) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-14 | | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (10) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (11) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (12) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (13) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (14) use of uninitialized value '*_15' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (17) following 'true' branch (when 'yychar_194 == -2')... | | (16) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (18) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (19) calling 'yylex' from 'yyparse' | +--> 'yylex': events 20-21 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (20) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (21) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 22-23 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (22) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (23) ...to here | <-------------+ | 'yyparse': events 24-29 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (24) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (25) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (26) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (27) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (28) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (29) use of uninitialized value '*_15' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 600 | pc->seconds = $2; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 738 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 750 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 754 | { pc->time_zone = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 767 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 769 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | pc->day_number = $1; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | pc->day_number = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 791 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 800 | pc->month = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 810 | if (4 <= $1.digits) | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (9) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (20) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (27) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (48) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (72) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 839 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 854 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 859 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 865 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 870 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 881 | pc->year = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -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-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 981 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 989 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (10) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (21) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (28) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (49) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (73) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | { $$ = $2.value; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1715:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1715 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1510 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (10) region created on stack here | | (11) capacity: 56 bytes |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (12) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (14) following 'false' branch (when 'yystate_207 != 12')... | | (13) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (15) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (16) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (18) following 'true' branch (when 'yychar_194 == -2')... | | (17) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (19) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (20) calling 'yylex' from 'yyparse' | +--> 'yylex': events 21-22 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (21) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (22) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 23-24 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (23) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (24) ...to here | <-------------+ | 'yyparse': events 25-32 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (25) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (26) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (27) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (28) following 'false' branch (when 'yyn_245 > 0')... |...... | 1708 | if (yyerrstatus) | | ~ ~ | | | | | | | (30) following 'false' branch (when 'yyerrstatus_210 == 0')... | | (29) ...to here |...... | 1712 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | | ~ | | | | | (31) ...to here |...... | 1715 | *++yyvsp = yylval; | | ~ | | | | | (32) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-14 | | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (10) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (11) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (12) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (13) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (14) use of uninitialized value '*_15' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (17) following 'true' branch (when 'yychar_194 == -2')... | | (16) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (18) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (19) calling 'yylex' from 'yyparse' | +--> 'yylex': events 20-21 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (20) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (21) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 22-23 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (22) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (23) ...to here | <-------------+ | 'yyparse': events 24-29 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (24) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (25) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (26) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (27) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (28) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (29) use of uninitialized value '*_15' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 600 | pc->seconds = $2; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (62) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (86) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (62) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (86) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (62) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (86) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (62) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (86) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (87) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 738 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 750 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 754 | { pc->time_zone = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (87) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 767 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 769 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | pc->day_number = $1; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | pc->day_number = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 791 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 800 | pc->month = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (62) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (86) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 810 | if (4 <= $1.digits) | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (9) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (20) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (27) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (48) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (62) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (72) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (86) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 839 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (62) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (86) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (62) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (86) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 854 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 859 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 865 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 870 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 881 | pc->year = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -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-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 981 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 989 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (10) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (21) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (28) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (49) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (73) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | { $$ = $2.value; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.c: In function 'yyparse': gl/parse-datetime.c:1715:12: warning: use of uninitialized value 'yylval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1715 | *++yyvsp = yylval; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1510 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); | | ~ | | | | | (10) region created on stack here | | (11) capacity: 56 bytes |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (12) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (14) following 'false' branch (when 'yystate_207 != 12')... | | (13) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (15) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (16) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (18) following 'true' branch (when 'yychar_194 == -2')... | | (17) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (19) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (20) calling 'yylex' from 'yyparse' | +--> 'yylex': events 21-22 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (21) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (22) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 23-24 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (23) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (24) ...to here | <-------------+ | 'yyparse': events 25-32 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (25) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (26) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (27) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (28) following 'false' branch (when 'yyn_245 > 0')... |...... | 1708 | if (yyerrstatus) | | ~ ~ | | | | | | | (30) following 'false' branch (when 'yyerrstatus_210 == 0')... | | (29) ...to here |...... | 1712 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | | ~ | | | | | (31) ...to here |...... | 1715 | *++yyvsp = yylval; | | ~ | | | | | (32) use of uninitialized value 'yylval' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'yyparse': events 1-14 | | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (10) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (11) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (12) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (13) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (14) use of uninitialized value '*_15' here | gl/parse-datetime.c:1748:9: warning: use of uninitialized value '*_15' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1748 | yyval = yyvsp[1-yylen]; | ^ 'parse_datetime_body': events 1-8 | |gl/parse-datetime.y:1708:1: | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (17) following 'true' branch (when 'yychar_194 == -2')... | | (16) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (18) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (19) calling 'yylex' from 'yyparse' | +--> 'yylex': events 20-21 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (20) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (21) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 22-23 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (22) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (23) ...to here | <-------------+ | 'yyparse': events 24-29 | |gl/parse-datetime.c:1667:16: | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (24) returning to 'yyparse' from 'yylex' |...... | 1695 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | | ~ | | | | | (25) following 'false' branch... | 1696 | goto yydefault; | 1697 | yyn = yytable[yyn]; | | ~ | | | | | (26) ...to here | 1698 | if (yyn <= 0) | | ~ | | | | | (27) following 'true' branch (when 'yyn_245 <= 0')... | 1699 | { | 1700 | if (yytable_value_is_error (yyn)) | | ~ | | | | | (28) ...to here |...... | 1748 | yyval = yyvsp[1-yylen]; | | ~ | | | | | (29) use of uninitialized value '*_15' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 600 | pc->seconds = $2; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:600:21: warning: use of uninitialized value 'yyvsp_217->timespec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 4:' branch... | 1753 | { | 1754 | case 4: /* timespec: '@' seconds */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:600:21: | 600 | pc->seconds = $2; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->timespec' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:672:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:672:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 19:' branch... |...... | 1851 | case 19: /* time: tUNUMBER tMERIDIAN */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:672:9: | 672 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (62) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:677:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (86) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:677:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:677:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 20:' branch... |...... | 1860 | case 20: /* time: tUNUMBER ':' tUNUMBER tMERIDIAN */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:677:9: | 677 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (62) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:682:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (86) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:682:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:682:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 21:' branch... |...... | 1869 | case 21: /* time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:682:9: | 682 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:691:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:691:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 23:' branch... |...... | 1878 | case 23: /* iso_8601_time: tUNUMBER zone_offset */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:691:9: | 691 | set_hhmmss (pc, $1.value, 0, 0, 0); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (9) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (20) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (27) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (48) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (62) out-of-bounds read from byte -160 till byte -153 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (72) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:696:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (86) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:696:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:696:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 24:' branch... |...... | 1887 | case 24: /* iso_8601_time: tUNUMBER ':' tUNUMBER o_zone_offset */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:696:9: | 696 | set_hhmmss (pc, $1.value, $3.value, 0, 0); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (9) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (20) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (27) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (48) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (62) out-of-bounds read from byte -272 till byte -265 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (72) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:701:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (86) out-of-bounds read from byte -216 till byte -209 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:701:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:701:9: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 25:' branch... |...... | 1896 | case 25: /* iso_8601_time: tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:701:9: | 701 | set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -280B].textintval.value' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:715:15: warning: use of uninitialized value '_67->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 28:' branch... |...... | 1905 | case 28: /* zone_offset: tSNUMBER o_colon_minutes */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:715:15: | 715 | if (! time_zone_hhmm (pc, $1, $2)) YYABORT; | | ^ | | | | | (87) use of uninitialized value '_67->textintval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 738 | { pc->local_isdst = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:738:36: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 29:' branch... |...... | 1914 | case 29: /* local_zone: tLOCAL_ZONE */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:738:36: | 738 | { pc->local_isdst = $1; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 750 | { pc->time_zone = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:750:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 31:' branch... |...... | 1929 | case 31: /* zone: tZONE */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:750:34: | 750 | { pc->time_zone = $1; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 754 | { pc->time_zone = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:754:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:754:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 33:' branch... |...... | 1941 | case 33: /* zone: tZONE relunit_snumber */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:754:35: | 754 | { pc->time_zone = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:760:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 34:' branch... |...... | 1950 | case 34: /* zone: 'T' relunit_snumber */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:760:15: | 760 | if (! apply_relative_time (pc, $2, 1)) YYABORT; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (28) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (73) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:764:15: warning: use of uninitialized value '_77->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 35:' branch... |...... | 1959 | case 35: /* zone: tZONE tSNUMBER o_colon_minutes */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:764:15: | 764 | { if (! time_zone_hhmm (pc, $2, $3)) YYABORT; | | ^ | | | | | (87) use of uninitialized value '_77->textintval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 767 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:767:34: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 36:' branch... |...... | 1966 | case 36: /* zone: tDAYZONE */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:767:34: | 767 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 769 | { pc->time_zone = $1 + 60 * 60; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:769:35: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:769:35: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 37:' branch... |...... | 1972 | case 37: /* zone: tZONE tDST */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:769:35: | 769 | { pc->time_zone = $1 + 60 * 60; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 776 | pc->day_number = $1; | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:776:35: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 38:' branch... |...... | 1978 | case 38: /* day: tDAY */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:776:35: | 776 | pc->day_number = $1; | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 781 | pc->day_number = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:781:36: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:781:36: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 39:' branch... |...... | 1987 | case 39: /* day: tDAY ',' */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:781:36: | 781 | pc->day_number = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 785 | pc->day_ordinal = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:785:37: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:785:37: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 40:' branch... |...... | 1996 | case 40: /* day: tORDINAL tDAY */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:785:37: | 785 | pc->day_ordinal = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 791 | pc->day_ordinal = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:791:49: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:791:49: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 41:' branch... |...... | 2006 | case 41: /* day: tUNUMBER tDAY */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:791:49: | 791 | pc->day_ordinal = $1.value; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 800 | pc->month = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (62) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:800:43: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (86) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:800:43: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:800:43: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 42:' branch... |...... | 2016 | case 42: /* date: tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:800:43: | 800 | pc->month = $1.value; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 810 | if (4 <= $1.digits) | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (9) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (20) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (27) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (48) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (62) out-of-bounds read from byte -208 till byte -201 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (72) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:810:40: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (86) out-of-bounds read from byte -152 till byte -145 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:810:40: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:810:40: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 43:' branch... |...... | 2025 | case 43: /* date: tUNUMBER '/' tUNUMBER '/' tUNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:810:40: | 810 | if (4 <= $1.digits) | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -224B].textintval.digits' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 839 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (62) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:839:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (86) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:839:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:839:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 44:' branch... |...... | 2062 | case 44: /* date: tUNUMBER tMONTH tSNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:839:41: | 839 | pc->day = $1.value; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 847 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (62) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:847:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (86) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:847:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:847:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 45:' branch... |...... | 2074 | case 45: /* date: tMONTH tSNUMBER tSNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:847:31: | 847 | pc->month = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 854 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:854:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:854:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 46:' branch... |...... | 2086 | case 46: /* date: tMONTH tUNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:854:31: | 854 | pc->month = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 859 | pc->month = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (9) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (20) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (27) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (48) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (62) out-of-bounds read from byte -168 till byte -161 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (72) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:859:31: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (86) out-of-bounds read from byte -112 till byte -105 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:859:31: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:859:31: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 47:' branch... |...... | 2095 | case 47: /* date: tMONTH tUNUMBER ',' tUNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:859:31: | 859 | pc->month = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -168B].intval' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 865 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:865:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:865:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 48:' branch... |...... | 2105 | case 48: /* date: tUNUMBER tMONTH */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:865:41: | 865 | pc->day = $1.value; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 870 | pc->day = $1.value; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (9) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (20) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (27) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (48) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (62) out-of-bounds read from byte -104 till byte -97 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (72) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:870:41: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (86) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:870:41: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:870:41: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 49:' branch... |...... | 2114 | case 49: /* date: tUNUMBER tMONTH tUNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:870:41: | 870 | pc->day = $1.value; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval.value' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 881 | pc->year = $1; | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (9) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (20) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'yyparse': events 1-26 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... | | (19) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | | (21) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here | | (20) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here | | (22) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (5) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (7) following 'true' branch (when 'yychar_194 == -2')... | | (6) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (8) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (9) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (11) following 'true' branch (when 'yychar_195 == 256')... | | (10) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (12) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (23) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (24) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (25) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (26) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (13) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (14) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (15) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (16) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (17) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (18) ...to here | 'yyparse': event 27 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (27) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (48) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (62) out-of-bounds read from byte -112 till byte -89 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (44) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (46) following 'true' branch (when 'yychar_194 == -2')... | | (45) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (47) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (48) calling 'yylex' from 'yyparse' | +--> 'yylex': events 49-50 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (49) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (50) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 51-52 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (51) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (52) ...to here | <-------------+ | 'yyparse': events 53-71 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (64) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (66) following 'false' branch (when 'yystate_207 != 12')... | | (65) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (67) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (53) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (54) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (56) following 'true' branch (when 'yychar_195 == 256')... | | (55) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (68) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (69) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (70) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (71) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (59) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (60) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (61) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (62) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (63) ...to here | 'yyparse': event 72 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (72) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:881:18: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (58) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (60) following 'true' branch (when 'yychar_194 == -2')... | | (59) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (61) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (62) calling 'yylex' from 'yyparse' | +--> 'yylex': events 63-64 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (63) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (64) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 65-66 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (65) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (66) ...to here | <-------------+ | 'yyparse': events 67-85 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (78) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (80) following 'false' branch (when 'yystate_207 != 12')... | | (79) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (81) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (67) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (68) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (70) following 'true' branch (when 'yychar_195 == 256')... | | (69) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (71) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (82) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (83) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (84) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (85) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (72) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (73) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (74) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (75) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (76) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (77) ...to here | 'yyparse': event 86 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (86) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:881:18: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:881:18: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 51:' branch... |...... | 2124 | case 51: /* iso_8601_date: tUNUMBER tSNUMBER tSNUMBER */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:881:18: | 881 | pc->year = $1; | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -112B].textintval' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:15: warning: use of uninitialized value '_136->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889: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:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:889:15: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (87) use of uninitialized value '_136->rel' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:889:66: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 52:' branch... |...... | 2135 | case 52: /* rel: relunit tAGO */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:889:66: | 889 | { if (! apply_relative_time (pc, $1, $2)) YYABORT; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:891:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 53:' branch... |...... | 2141 | case 53: /* rel: relunit */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:891:15: | 891 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:893:15: warning: use of uninitialized value 'yyvsp_217->rel' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 54:' branch... |...... | 2147 | case 54: /* rel: dayshift */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:893:15: | 893 | { if (! apply_relative_time (pc, $1, 1)) YYABORT; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->rel' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:898:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:898:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 55:' branch... |...... | 2153 | case 55: /* relunit: tORDINAL tYEAR_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:898:69: | 898 | { $$ = RELATIVE_TIME_0; $$.year = $1; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:900:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:900:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 56:' branch... |...... | 2159 | case 56: /* relunit: tUNUMBER tYEAR_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:900:81: | 900 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:904:70: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:904:70: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 58:' branch... |...... | 2171 | case 58: /* relunit: tORDINAL tMONTH_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:904:70: | 904 | { $$ = RELATIVE_TIME_0; $$.month = $1; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:906:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:906:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 59:' branch... |...... | 2177 | case 59: /* relunit: tUNUMBER tMONTH_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:906:82: | 906 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:911:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:911:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 61:' branch... |...... | 2189 | case 61: /* relunit: tORDINAL tDAY_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:911:13: | 911 | if (INT_MULTIPLY_WRAPV ($1, $2, &$$.day)) YYABORT; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:914:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:914:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 62:' branch... |...... | 2196 | case 62: /* relunit: tUNUMBER tDAY_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:914:13: | 914 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:916:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 63:' branch... |...... | 2203 | case 63: /* relunit: tDAY_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:916:67: | 916 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:918:69: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:918:69: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 64:' branch... |...... | 2209 | case 64: /* relunit: tORDINAL tHOUR_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:918:69: | 918 | { $$ = RELATIVE_TIME_0; $$.hour = $1; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:920:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:920:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 65:' branch... |...... | 2215 | case 65: /* relunit: tUNUMBER tHOUR_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:920:81: | 920 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:924:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:924:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 67:' branch... |...... | 2227 | case 67: /* relunit: tORDINAL tMINUTE_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:924:72: | 924 | { $$ = RELATIVE_TIME_0; $$.minutes = $1; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:926:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:926:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 68:' branch... |...... | 2233 | case 68: /* relunit: tUNUMBER tMINUTE_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:926:84: | 926 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:930:72: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:930:72: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 70:' branch... |...... | 2245 | case 70: /* relunit: tORDINAL tSEC_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:930:72: | 930 | { $$ = RELATIVE_TIME_0; $$.seconds = $1; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].intval' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:932:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:932:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 71:' branch... |...... | 2251 | case 71: /* relunit: tUNUMBER tSEC_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:932:84: | 932 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:934:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:934:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 72:' branch... |...... | 2257 | case 72: /* relunit: tSDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:934:82: | 934 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -49 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:936:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:936:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 73:' branch... |...... | 2263 | case 73: /* relunit: tUDECIMAL_NUMBER tSEC_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:936:82: | 936 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].timespec.tv_sec' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:944:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:944:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 76:' branch... |...... | 2275 | case 76: /* relunit_snumber: tSNUMBER tYEAR_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:944:81: | 944 | { $$ = RELATIVE_TIME_0; $$.year = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:946:82: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:946:82: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 77:' branch... |...... | 2281 | case 77: /* relunit_snumber: tSNUMBER tMONTH_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:946:82: | 946 | { $$ = RELATIVE_TIME_0; $$.month = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:949:13: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:949:13: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 78:' branch... |...... | 2287 | case 78: /* relunit_snumber: tSNUMBER tDAY_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:949:13: | 949 | if (INT_MULTIPLY_WRAPV ($1.value, $2, &$$.day)) YYABORT; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:951:81: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:951:81: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 79:' branch... |...... | 2294 | case 79: /* relunit_snumber: tSNUMBER tHOUR_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:951:81: | 951 | { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (9) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (20) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (48) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (62) out-of-bounds read from byte -48 till byte -41 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:953:84: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:953:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 80:' branch... |...... | 2300 | case 80: /* relunit_snumber: tSNUMBER tMINUTE_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:953:84: | 953 | { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (9) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (10) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -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-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (20) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (21) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (28) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (48) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (49) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (62) 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]' gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (63) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (73) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:955:84: warning: use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 81:' branch... |...... | 2306 | case 81: /* relunit_snumber: tSNUMBER tSEC_UNIT */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:955:84: | 955 | { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } | | ^ | | | | | (87) use of uninitialized value 'MEM[(union YYSTYPE *)yyvsp_217 + -56B].textintval.value' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:960:67: warning: use of uninitialized value 'yyvsp_217->intval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 82:' branch... |...... | 2312 | case 82: /* dayshift: tDAY_SHIFT */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:960:67: | 960 | { $$ = RELATIVE_TIME_0; $$.day = $1; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->intval' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:969:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 86:' branch... |...... | 2318 | case 86: /* signed_seconds: tSNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:969:56: | 969 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:976:56: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 88:' branch... |...... | 2325 | case 88: /* unsigned_seconds: tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:976:56: | 976 | $$.tv_sec = $1.value; $$.tv_nsec = 0; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 981 | { digits_to_date_time (pc, $1); } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:981:9: warning: use of uninitialized value 'yyvsp_217->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 89:' branch... |...... | 2332 | case 89: /* number: tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:981:9: | 981 | { digits_to_date_time (pc, $1); } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 989 | digits_to_date_time (pc, $1); | ^ 'yyparse': events 1-8 | |gl/parse-datetime.c:1579:6: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ^ | | | | | (1) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (3) following 'false' branch (when 'yystate_207 != 12')... | | (2) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (4) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (5) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (6) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (7) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (8) ...to here | 'yyparse': event 9 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (9) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (10) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-19 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (10) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (12) following 'false' branch (when 'yystate_207 != 12')... | | (11) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (13) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (15) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (16) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (17) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (18) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (19) ...to here | 'yyparse': event 20 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (20) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (21) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'yyparse': events 1-27 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... | | (20) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | | (22) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here | | (21) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here | | (23) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (6) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (8) following 'true' branch (when 'yychar_194 == -2')... | | (7) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (9) ...to here |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (10) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (12) following 'true' branch (when 'yychar_195 == 256')... | | (11) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (13) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (24) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (25) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (26) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (27) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (14) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (15) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (16) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (17) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (18) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (19) ...to here | 'yyparse': event 28 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (28) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-47 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (40) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (42) following 'false' branch (when 'yystate_207 != 12')... | | (41) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (43) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (44) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (45) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (46) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (47) ...to here | 'yyparse': event 48 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (48) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (49) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: stack-based buffer under-read [CWE-127] [-Wanalyzer-out-of-bounds] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-61 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (54) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (56) following 'false' branch (when 'yystate_207 != 12')... | | (55) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (57) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (58) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (59) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (60) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (61) ...to here | 'yyparse': event 62 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (62) out-of-bounds read from byte -56 till byte -33 but 'yyvsa' starts at byte 0 | gl/parse-datetime.y:989:9: note: valid subscripts for 'yyvsa' are '[0]' to '[19]' gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (63) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-49 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (45) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (47) following 'true' branch (when 'yychar_194 == -2')... | | (46) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (48) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (49) calling 'yylex' from 'yyparse' | +--> 'yylex': events 50-51 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (50) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (51) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 52-53 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (52) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (53) ...to here | <-------------+ | 'yyparse': events 54-72 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (65) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (67) following 'false' branch (when 'yystate_207 != 12')... | | (66) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (68) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (54) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (55) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (57) following 'true' branch (when 'yychar_195 == 256')... | | (56) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (69) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (70) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (71) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (72) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (60) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (61) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (62) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (63) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (64) ...to here | 'yyparse': event 73 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (73) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:989:9: warning: use of uninitialized value '_176->textintval' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-63 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (59) following 'false' branch (when 'yyn_240 != -91')... |...... | 1664 | if (yychar == YYEMPTY) | | ~ ~ | | | | | | | (61) following 'true' branch (when 'yychar_194 == -2')... | | (60) ...to here | 1665 | { | 1666 | YYDPRINTF ((stderr, "Reading a token\n")); | | ~ | | | | | (62) ...to here | 1667 | yychar = yylex (&yylval, pc); | | ~ | | | | | (63) calling 'yylex' from 'yyparse' | +--> 'yylex': events 64-65 | |gl/parse-datetime.y:1411:1: | 1411 | yylex (union YYSTYPE *lvalp, parser_control *pc) | | ^ | | | | | (64) entry to 'yylex' |...... | 1498 | if (c_isalpha (c)) | | ~ | | | | | (65) inlined call to 'c_isalpha' from 'yylex' | +--> 'c_isalpha': events 66-67 | |gl/./c-ctype.h:183:3: | 183 | switch (c) | | ^ | | | | | (66) following 'default:' branch... |...... | 189 | return false; | | ~ | | | | | (67) ...to here | <-------------+ | 'yyparse': events 68-86 | |gl/parse-datetime.c:1667:16: | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (79) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (81) following 'false' branch (when 'yystate_207 != 12')... | | (80) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (82) ...to here |...... | 1667 | yychar = yylex (&yylval, pc); | | ^ | | | | | (68) returning to 'yyparse' from 'yylex' |...... | 1670 | if (yychar <= YYEOF) | | ~ | | | | | (69) following 'false' branch (when 'yychar_195 > 0')... |...... | 1676 | else if (yychar == YYerror) | | ~ ~ | | | | | | | (71) following 'true' branch (when 'yychar_195 == 256')... | | (70) ...to here |...... | 1682 | yychar = YYUNDEF; | | ~ | | | | | (72) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (83) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (84) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (85) following 'case 90:' branch... |...... | 2338 | case 90: /* hybrid: tUNUMBER relunit_snumber */ | | ~ | | | | | (86) ...to here |...... | 2465 | if (!yypact_value_is_default (yyn)) | | ~ | | | | | (73) following 'true' branch (when 'yyn_391 != -91')... | 2466 | { | 2467 | yyn += YYSYMBOL_YYerror; | | ~ | | | | | (74) ...to here | 2468 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) | | ~ | | | | | (75) following 'true' branch... | 2469 | { | 2470 | yyn = yytable[yyn]; | | ~ | | | | | (76) ...to here | 2471 | if (0 < yyn) | | ~ | | | | | (77) following 'true' branch (when 'yyn_393 > 0')... |...... | 2489 | *++yyvsp = yylval; | | ~ | | | | | (78) ...to here | 'yyparse': event 87 | |gl/parse-datetime.y:989:9: | 989 | digits_to_date_time (pc, $1); | | ^ | | | | | (87) use of uninitialized value '_176->textintval' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 998 | { $$ = $2.value; } | ^ 'yyparse': events 1-9 | |gl/parse-datetime.c:1531:13: | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ^ | | | | | (1) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (2) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (4) following 'false' branch (when 'yystate_207 != 12')... | | (3) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (5) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (6) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (7) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (8) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (9) ...to here | 'yyparse': event 10 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (10) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime_body': events 1-8 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (2) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (3) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (4) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (5) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (6) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (7) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (8) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 9-20 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (9) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (10) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (11) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (13) following 'false' branch (when 'yystate_207 != 12')... | | (12) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (14) ...to here |...... | 1658 | if (yypact_value_is_default (yyn)) | | ~ | | | | | (15) following 'true' branch (when 'yyn_240 == -91')... | 1659 | goto yydefault; | | ~ | | | | | (16) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (17) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (18) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (19) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (20) ...to here | 'yyparse': event 21 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (21) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'parse_datetime': events 1-2 | | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (1) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (2) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 3 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (3) entry to 'tzalloc' | 'tzalloc': events 4-7 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (4) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (5) ...to here |...... | 78 | if (name) | | ~ | | | | | (6) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (7) ...to here | <------+ | 'parse_datetime': events 8-11 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (8) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (9) following 'false' branch... | 2398 | return false; | 2399 | bool ok = parse_datetime_body (result, p, now, 0, tz, tzstring); | | ~ ~ | | | | | | | (11) calling 'parse_datetime_body' from 'parse_datetime' | | (10) ...to here | +--> 'parse_datetime_body': events 12-13 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (12) entry to 'parse_datetime_body' |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (13) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 14 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (14) entry to 'localtime_rz' | 'localtime_rz': events 15-17 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (15) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (16) ...to here (17) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 18-19 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (18) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (19) following 'true' branch... | 'set_tz': event 20 | |lto1: | (20): ...to here | <------+ | 'localtime_rz': events 21-26 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (21) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (22) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (25) ...to here (24) following 'true' branch... | | (23) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (26) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 27 | | 235 | if (tz == local_tz) | | ^ | | | | | (27) following 'true' branch... | <------+ | 'localtime_rz': events 28-29 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (28) ...to here (29) following 'true' branch... | 'localtime_rz': event 30 | |lto1: | (30): ...to here | <------+ | 'parse_datetime_body': events 31-38 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (31) returning to 'parse_datetime_body' from 'localtime_rz' | | (32) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (33) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (34) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (35) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (36) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (37) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (38) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 39-48 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (39) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (40) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (41) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (43) following 'false' branch (when 'yystate_207 != 12')... | | (42) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (44) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (45) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (46) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (47) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (48) ...to here | 'yyparse': event 49 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (49) use of uninitialized value 'yyvsp_217->textintval.value' here | gl/parse-datetime.y:998:47: warning: use of uninitialized value 'yyvsp_217->textintval.value' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 'get_crl_next_update': events 1-2 | |certtool-cfg.c:2624:8: | 2624 | time_t get_crl_next_update(void) | | ^ | | | | | (1) entry to 'get_crl_next_update' | 2625 | { | 2626 | 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 | | 1792 | static time_t get_int_date(const char *txt_val, int int_val, const char *msg) | | ^ | | | | | (3) entry to 'get_int_date' | 1793 | { | 1794 | if (batch) { | | ~ | | | | | (4) following 'true' branch... | 1795 | if (txt_val == NULL) { | | ~ ~ | | | | | | | (6) following 'false' branch (when 'txt_val_13(D)' is non-NULL)... | | (5) ...to here |...... | 1806 | return get_date(txt_val); | | ~ ~ | | | | | | | (8) calling 'get_date' from 'get_int_date' | | (7) ...to here | +--> 'get_date': events 9-12 | | 1711 | static time_t get_date(const char *date) | | ^ | | | | | (9) entry to 'get_date' |...... | 1715 | if (date == NULL || parse_datetime(&r, date, NULL) == 0) { | | ~ ~ | | | | | | | (11) ...to here | | | (12) calling 'parse_datetime' from 'get_date' | | (10) following 'false' branch (when 'date_3(D)' is non-NULL)... | +--> 'parse_datetime': events 13-14 | |gl/parse-datetime.y:2392:1: | 2392 | parse_datetime (struct timespec *result, char const *p, | | ^ | | | | | (13) entry to 'parse_datetime' |...... | 2396 | timezone_t tz = tzalloc (tzstring); | | ~ | | | | | (14) calling 'tzalloc' from 'parse_datetime' | +--> 'tzalloc': event 15 | |gl/./time.h:890:1: | 890 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | | ^ | | | | | (15) entry to 'tzalloc' | 'tzalloc': events 16-19 | |gl/time_rz.c:70:6: | 70 | if (tz) | | ^ | | | | | (16) following 'true' branch (when 'tz_14' is non-NULL)... | 71 | { | 72 | tz->next = NULL; | | ~ | | | | | (17) ...to here |...... | 78 | if (name) | | ~ | | | | | (18) following 'false' branch (when 'name_10(D)' is NULL)... |...... | 81 | return tz; | | ~ | | | | | (19) ...to here | <------+ | 'parse_datetime': events 20-23 | |gl/parse-datetime.y:2396:19: | 2396 | timezone_t tz = tzalloc (tzstring); | | ^ | | | | | (20) returning to 'parse_datetime' from 'tzalloc' | 2397 | if (!tz) | | ~ | | | | | (21) following 'false' branch... | 2398 | return false; | 2399 | 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 | | 1708 | parse_datetime_body (struct timespec *result, char const *p, | | ^ | | | | | (24) entry to 'parse_datetime_body' |...... | 1726 | if (! now) | | ~ | | | | | (25) following 'true' branch (when 'now_206(D)' is NULL)... | 1727 | { | 1728 | gettime (&gettime_buffer); | | ~ | | | | | (26) ...to here |...... | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ | | | | | (27) calling 'localtime_rz' from 'parse_datetime_body' | +--> 'localtime_rz': event 28 | |gl/./time.h:904:1: | 904 | _GL_FUNCDECL_SYS (localtime_rz, struct tm *, | | ^ | | | | | (28) entry to 'localtime_rz' | 'localtime_rz': events 29-31 | |gl/time_rz.c:268:6: | 268 | if (!tz) | | ^ | | | | | (29) following 'false' branch (when 'tz_7(D)' is non-NULL)... |...... | 272 | timezone_t old_tz = set_tz (tz); | | ~ ~ | | | | | | (30) ...to here (31) calling 'set_tz' from 'localtime_rz' | +--> 'set_tz': events 32-33 | | 206 | set_tz (timezone_t tz) | | ^ | | | | | (32) entry to 'set_tz' |...... | 209 | if (env_tz | | ~ | | | | | (33) following 'true' branch... | 'set_tz': event 34 | |lto1: | (34): ...to here | <------+ | 'localtime_rz': events 35-40 | | 272 | timezone_t old_tz = set_tz (tz); | | ^ | | | | | (35) returning to 'localtime_rz' from 'set_tz' | 273 | if (old_tz) | | ~ | | | | | (36) following 'true' branch... | 274 | { | 275 | bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); | | ~ ~ ~ | | | | | | | | (39) ...to here (38) following 'true' branch... | | (37) ...to here | 276 | if (revert_tz (old_tz) && abbr_saved) | | ~ | | | | | (40) inlined call to 'revert_tz' from 'localtime_rz' | +--> 'revert_tz': event 41 | | 235 | if (tz == local_tz) | | ^ | | | | | (41) following 'true' branch... | <------+ | 'localtime_rz': events 42-43 | | 276 | if (revert_tz (old_tz) && abbr_saved) | | ^ ~ | | | | | | (42) ...to here (43) following 'true' branch... | 'localtime_rz': event 44 | |lto1: | (44): ...to here | <------+ | 'parse_datetime_body': events 45-52 | |gl/parse-datetime.y:1790:9: | 1790 | if (! localtime_rz (tz, &now->tv_sec, &tmp)) | | ~ ^ | | | | | | | (45) returning to 'parse_datetime_body' from 'localtime_rz' | | (46) following 'false' branch... |...... | 1796 | if (*p == '\0') | | ~ | | | | | (47) ...to here |...... | 1804 | if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) | | ~ | | | | | (48) following 'false' branch... |...... | 1810 | pc.year.digits = 0; | | ~ | | | | | (49) ...to here |...... | 1849 | for (quarter = 1; quarter <= 3; quarter++) | | ~ | | | | | (50) following 'true' branch (when 'quarter_173 != 4')... | 1850 | { | 1851 | time_t probe; | | ~ | | | | | (51) ...to here |...... | 1899 | if (yyparse (&pc) != 0) | | ~ | | | | | (52) calling 'yyparse' from 'parse_datetime_body' | +--> 'yyparse': events 53-62 | |gl/parse-datetime.c:1500:1: | 1500 | yyparse (parser_control *pc) | | ^ | | | | | (53) entry to 'yyparse' |...... | 1531 | YYSTYPE yyvsa[YYINITDEPTH]; | | ~ | | | | | (54) region created on stack here |...... | 1579 | if (yyss + yystacksize - 1 <= yyssp) | | ~ | | | | | (55) following 'false' branch... |...... | 1643 | if (yystate == YYFINAL) | | ~ ~ | | | | | | | (57) following 'false' branch (when 'yystate_207 != 12')... | | (56) ...to here |...... | 1646 | goto yybackup; | | ~ | | | | | (58) ...to here |...... | 1728 | if (yyn == 0) | | ~ | | | | | (59) following 'false' branch (when 'yyn_250 != 0')... | 1729 | goto yyerrlab; | 1730 | goto yyreduce; | | ~ | | | | | (60) ...to here |...... | 1752 | switch (yyn) | | ~ | | | | | (61) following 'case 92:' branch... |...... | 2355 | case 92: /* o_colon_minutes: ':' tUNUMBER */ | | ~ | | | | | (62) ...to here | 'yyparse': event 63 | |gl/parse-datetime.y:998:47: | 998 | { $$ = $2.value; } | | ^ | | | | | (63) use of uninitialized value 'yyvsp_217->textintval.value' here | make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src' Making all in tests make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/tests' Making all in . make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/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 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 libpkcs11mock3.la CCLD libutils.la CCLD libpkcs11mock1.la make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/tests' Making all in cert-tests make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/tests/cert-tests' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/tests/cert-tests' Making all in slow make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/tests/slow' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/tests/slow' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/tests' Making all in fuzz make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/fuzz' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/fuzz' Making all in doc/manpages make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc/manpages' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc/manpages' Making all in doc make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc' Making all in examples make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc/examples' CC ex-alert.lo CC ex-session-info.lo CC ex-client-resume.o CC ex-x509-info.lo CC ex-pkcs12.lo CC ex-client-x509-3.1.lo CC ex-verify.lo CC udp.lo CC tcp.lo CC verify.lo CC ex-pkcs11-list.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 print-ciphersuites CCLD ex-client-anon CCLD ex-serv-x509 CCLD ex-serv-dtls CCLD ex-client-dtls CCLD ex-client-psk CCLD ex-client-x509 CCLD ex-client-resume CCLD ex-cert-select CCLD ex-ocsp-client CCLD ex-cert-select-pkcs11 CCLD ex-serv-anon CCLD ex-serv-psk CCLD tlsproxy/tlsproxy ex-serv-x509.c: In function 'main': ex-serv-x509.c:113:9: warning: 'listen' on possibly invalid file descriptor 'listen_sd_58' [-Wanalyzer-fd-use-without-check] 113 | listen(listen_sd, 1024); | ^ 'main': events 1-16 | | 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) when 'socket' fails |...... | 113 | listen(listen_sd, 1024); | | ~ | | | | | (16) 'listen_sd_58' could be invalid | CXXLD ex-cxx 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; | ^ tlsproxy/tlsproxy.c: In function 'runlistener': tlsproxy/tlsproxy.c:228:16: warning: leak of file descriptor 'bindtoaddress (listenaddr)' [CWE-775] [-Wanalyzer-fd-leak] 228 | while (!rxsigquit) { | ^ 'runlistener': events 1-2 | | 214 | static int runlistener(void) | | ^ | | | | | (1) entry to 'runlistener' |...... | 217 | if ((listenfd = bindtoaddress(listenaddr)) < 0) { | | ~ | | | | | (2) calling 'bindtoaddress' from 'runlistener' | +--> 'bindtoaddress': events 3-14 | | 57 | static int bindtoaddress(char *addrport) | | ^ | | | | | (3) entry to 'bindtoaddress' |...... | 80 | if (s != 0) { | | ~ | | | | | (4) following 'false' branch... |...... | 88 | for (rp = result; rp != NULL; rp = rp->ai_next) { | | ~ ~ | | | | | | (5) ...to here (6) following 'true' branch (when 'rp_14' is non-NULL)... | 89 | fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); | | ~ ~ | | | | | | | (8) socket created here | | | (9) when 'socket' succeeds | | (7) ...to here | 90 | | 91 | if (fd >= 0) { | | ~ | | | | | (10) following 'true' branch (when 'fd_40 >= 0')... | 92 | int one = 1; | | ~ | | | | | (11) ...to here | 93 | if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, | | ~ | | | | | (12) following 'false' branch... |...... | 98 | if (bind(fd, rp->ai_addr, rp->ai_addrlen) == 0) | | ~ ~ | | | | | | | (14) following 'true' branch... | | (13) ...to here | 'bindtoaddress': event 15 | |lto1: | (15): ...to here | 'bindtoaddress': events 16-21 | | 83 | return -1; | | ~ | | | | | (21) ...to here |...... | 104 | if (!rp) { | | ^ | | | | | (16) following 'false' branch (when 'rp_29' is non-NULL)... |...... | 110 | freeaddrinfo(result); /* No longer needed */ | | ~ | | | | | (17) ...to here | 111 | | 112 | if (listen(fd, 5) < 0) { | | ~~ | | || | | |(18) stream socket marked as passive here via 'listen' | | |(19) when 'listen' succeeds | | (20) following 'false' branch... | <------+ | 'runlistener': events 22-23 | | 217 | if ((listenfd = bindtoaddress(listenaddr)) < 0) { | | ~ ^ | | | | | | | (22) returning to 'runlistener' from 'bindtoaddress' | | (23) following 'false' branch... | 'runlistener': event 24 | |lto1: | (24): ...to here | 'runlistener': event 25 | | 228 | while (!rxsigquit) { | | ^ | | | | | (25) 'bindtoaddress (listenaddr)' leaks 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; | ^ 'runlistener': events 1-2 | |tlsproxy/tlsproxy.c:214:12: | 214 | static int runlistener(void) | | ^ | | | | | (1) entry to 'runlistener' |...... | 217 | if ((listenfd = bindtoaddress(listenaddr)) < 0) { | | ~ | | | | | (2) calling 'bindtoaddress' from 'runlistener' | +--> 'bindtoaddress': events 3-13 | | 57 | static int bindtoaddress(char *addrport) | | ^ | | | | | (3) entry to 'bindtoaddress' |...... | 80 | if (s != 0) { | | ~ | | | | | (4) following 'false' branch... |...... | 88 | for (rp = result; rp != NULL; rp = rp->ai_next) { | | ~ ~ | | | | | | (5) ...to here (6) following 'true' branch (when 'rp_14' is non-NULL)... | 89 | fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); | | ~ ~ | | | | | | | (8) when 'socket' succeeds | | (7) ...to here | 90 | | 91 | if (fd >= 0) { | | ~ | | | | | (9) following 'true' branch (when 'fd_40 >= 0')... | 92 | int one = 1; | | ~ | | | | | (10) ...to here | 93 | if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, | | ~ | | | | | (11) following 'false' branch... |...... | 98 | if (bind(fd, rp->ai_addr, rp->ai_addrlen) == 0) | | ~ ~ | | | | | | | (13) following 'true' branch... | | (12) ...to here | 'bindtoaddress': event 14 | |lto1: | (14): ...to here | 'bindtoaddress': events 15-19 | | 83 | return -1; | | ~ | | | | | (19) ...to here |...... | 104 | if (!rp) { | | ^ | | | | | (15) following 'false' branch (when 'rp_29' is non-NULL)... |...... | 110 | freeaddrinfo(result); /* No longer needed */ | | ~ | | | | | (16) ...to here | 111 | | 112 | if (listen(fd, 5) < 0) { | | ~~ | | || | | |(17) when 'listen' succeeds | | (18) following 'false' branch... | <------+ | 'runlistener': events 20-21 | | 217 | if ((listenfd = bindtoaddress(listenaddr)) < 0) { | | ~ ^ | | | | | | | (20) returning to 'runlistener' from 'bindtoaddress' | | (21) following 'false' branch... | 'runlistener': event 22 | |lto1: | (22): ...to here | 'runlistener': event 23 | | 228 | while (!rxsigquit) { | | ^ | | | | | (23) following 'true' branch... | 'runlistener': event 24 | |lto1: | (24): ...to here | 'runlistener': events 25-29 | | 237 | if (rxsigquit) | | ^ | | | | | (25) following 'false' branch... | 238 | break; | 239 | if (nofork < 2) { | | ~ ~ | | | | | | | (27) following 'true' branch... | | (26) ...to here | 240 | int ret = runproxy(fd); | | ~ ~ | | | | | | | (29) calling 'runproxy' from 'runlistener' | | (28) ...to here | +--> 'runproxy': events 30-31 | | 178 | static int runproxy(int acceptfd) | | ^ | | | | | (30) entry to 'runproxy' |...... | 181 | if ((connectfd = connecttoaddress(connectaddr)) < 0) { | | ~ | | | | | (31) calling 'connecttoaddress' from 'runproxy' | +--> 'connecttoaddress': events 32-43 | | 120 | static int connecttoaddress(char *addrport) | | ^ | | | | | (32) entry to 'connecttoaddress' |...... | 146 | if (s != 0) { | | ~ | | | | | (33) following 'false' branch... |...... | 153 | for (rp = result; rp != NULL; rp = rp->ai_next) { | | ~ ~ | | | | | | (34) ...to here (35) following 'true' branch (when 'rp_14' is non-NULL)... | 154 | fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); | | ~ ~ | | | | | | | (37) when 'socket' succeeds | | (36) ...to here | 155 | if (fd >= 0) { | | ~ | | | | | (38) following 'true' branch (when 'fd_42 >= 0')... | 156 | if (connect(fd, rp->ai_addr, rp->ai_addrlen) == 0) | | ~ ~ | | | | | | | (40) following 'true' branch... | | (39) ...to here |...... | 162 | if (!rp) { | | ~ ~ | | | | | | | (42) following 'false' branch (when 'rp_28' is non-NULL)... | | (41) ...to here |...... | 168 | freeaddrinfo(result); /* No longer needed */ | | ~ | | | | | (43) ...to here | <------+ | 'runproxy': events 44-47 | | 181 | if ((connectfd = connecttoaddress(connectaddr)) < 0) { | | ~ ^ | | | | | | | (44) returning to 'runproxy' from 'connecttoaddress' | | (45) following 'false' branch... |...... | 187 | tlssession_t *session = tlssession_new(server, keyfile, certfile, | | ~ ~ | | | | | | (46) ...to here (47) calling 'tlssession_new' from 'runproxy' | +--> 'tlssession_new': events 48-64 | |tlsproxy/crypto-gnutls.c:163:15: | 163 | tlssession_t *tlssession_new(int isserver, char *keyfile, char *certfile, | | ^ | | | | | (48) entry to 'tlssession_new' |...... | 172 | if (!s) | | ~ | | | | | (49) following 'false' branch (when 's_36' is non-NULL)... |...... | 175 | if (quitfn) | | ~ ~ | | | | | | | (51) following 'true' branch (when 'quitfn_37(D)' is non-NULL)... | | (50) ...to here | 176 | s->quitfn = quitfn; | | ~ | | | | | (52) ...to here |...... | 180 | if (erroutfn) | | ~ | | | | | (53) following 'false' branch (when 'erroutfn_40(D)' is NULL)... |...... | 183 | s->erroutfn = stderrout; | | ~ | | | | | (54) ...to here |...... | 190 | if (gnutls_certificate_allocate_credentials(&s->creds) < 0) { | | ~ | | | | | (55) following 'false' branch... |...... | 195 | if (cacertfile != NULL) { | | ~ | | | | | (56) ...to here |...... | 232 | if (ret < 0) { | | ~ | | | | | (57) following 'false' branch (when 'ret_21 >= 0')... |...... | 238 | gnutls_session_set_ptr(s->session, (void *)s); | | ~ | | | | | (58) ...to here |...... | 251 | if (ret < 0) { | | ~ | | | | | (59) following 'false' branch... |...... | 257 | ret = gnutls_credentials_set(s->session, GNUTLS_CRD_CERTIFICATE, | | ~ | | | | | (60) ...to here | 258 | s->creds); | 259 | if (ret < 0) { | | ~ | | | | | (61) following 'false' branch... |...... | 265 | if (isserver) { | | ~ ~ | | | | | | | (63) following 'true' branch (when 'isserver_64(D) != 0')... | | (62) ...to here | 266 | /* requests but does not check a client certificate */ | 267 | gnutls_certificate_server_set_request(s->session, | | ~ | | | | | (64) ...to here | <------+ | 'runproxy': events 65-70 | |tlsproxy/tlsproxy.c:187:33: | 187 | tlssession_t *session = tlssession_new(server, keyfile, certfile, | | ^ | | | | | (65) returning to 'runproxy' from 'tlssession_new' |...... | 190 | if (!session) { | | ~ | | | | | (66) following 'false' branch... |...... | 197 | int ret; | | ~ | | | | | (67) ...to here | 198 | if (server) | | ~ | | | | | (68) following 'true' branch... | 199 | ret = tlssession_mainloop(acceptfd, connectfd, session); | | ~ ~ | | | | | | | (70) calling 'tlssession_mainloop' from 'runproxy' | | (69) ...to here | +--> 'tlssession_mainloop': events 71-72 | |tlsproxy/crypto-gnutls.c:293:5: | 293 | int tlssession_mainloop(int cryptfd, int plainfd, tlssession_t *s) | | ^ | | | | | (71) entry to 'tlssession_mainloop' |...... | 303 | buffer_t *plainToCrypt = bufNew(BUF_SIZE, BUF_HWM); | | ~ | | | | | (72) calling 'bufNew' from 'tlssession_mainloop' | +--> 'bufNew': events 73-74 | |tlsproxy/buffer.c:78:11: | 78 | buffer_t *bufNew(ssize_t size, ssize_t hwm) | | ^ | | | | | (73) entry to 'bufNew' |...... | 81 | if (!b) | | ~ | | | | | (74) following 'true' branch (when 'b_6' is NULL)... | 'bufNew': event 75 | |lto1: | (75): ...to here | <------+ | 'tlssession_mainloop': events 76-77 | |tlsproxy/crypto-gnutls.c:303:34: | 303 | buffer_t *plainToCrypt = bufNew(BUF_SIZE, BUF_HWM); | | ^ | | | | | (76) returning to 'tlssession_mainloop' from 'bufNew' | 304 | buffer_t *cryptToPlain = bufNew(BUF_SIZE, BUF_HWM); | | ~ | | | | | (77) calling 'bufNew' from 'tlssession_mainloop' | +--> 'bufNew': events 78-81 | |tlsproxy/buffer.c:78:11: | 78 | buffer_t *bufNew(ssize_t size, ssize_t hwm) | | ^ | | | | | (78) entry to 'bufNew' | 79 | { | 80 | buffer_t *b = calloc(1, sizeof(buffer_t)); | | ~ | | | | | (79) allocated here | 81 | if (!b) | | ~ | | | | | (80) assuming 'b_6' is NULL | | (81) following 'true' branch (when 'b_6' is NULL)... | 'bufNew': event 82 | |lto1: | (82): ...to here | <------+ | 'tlssession_mainloop': events 83-84 | |tlsproxy/crypto-gnutls.c:304:34: | 304 | buffer_t *cryptToPlain = bufNew(BUF_SIZE, BUF_HWM); | | ^ | | | | | (83) returning to 'tlssession_mainloop' from 'bufNew' | 305 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ~ | | | | | (84) calling 'socksetnonblock' from 'tlssession_mainloop' | +--> 'socksetnonblock': events 85-86 | | 105 | static int socksetnonblock(int fd, int nb) | | ^ | | | | | (85) entry to 'socksetnonblock' | 106 | { | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ~ | | | | | (86) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 87-89 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (87) entry to 'rpl_fcntl' |...... | 211 | switch (action) | | ~ | | | | | (88) following 'default:' branch... |...... | 256 | default: | | ~ | | | | | (89) ...to here | 'rpl_fcntl': event 90 | |lto1: | (90): following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... | 'rpl_fcntl': event 91 | | 286 | case F_GETFD: | | ^ | | | | | (91) ...to here | <------+ | 'socksetnonblock': events 92-97 | |tlsproxy/crypto-gnutls.c:107:18: | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ^ | | | | | (92) returning to 'socksetnonblock' from 'rpl_fcntl' | 108 | if (sf == -1) | | ~ | | | | | (93) following 'false' branch... | 109 | return -1; | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ~ ~ | | | | | | | (95) following 'false' branch (when 'nb_8(D) == 0')... | | | (96) ...to here | | | (97) calling 'rpl_fcntl' from 'socksetnonblock' | | (94) ...to here | +--> 'rpl_fcntl': events 98-100 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (98) entry to 'rpl_fcntl' |...... | 211 | switch (action) | | ~ | | | | | (99) following 'default:' branch... |...... | 256 | default: | | ~ | | | | | (100) ...to here | 'rpl_fcntl': event 101 | |lto1: | (101): following 'case 2:, case 4:, case 8:, case 10:, case 1024:, case 1026:, case 1030 ... 1031:, case 1033:' branch... | 'rpl_fcntl': event 102 | | 332 | case F_ADD_SEALS: | | ^ | | | | | (102) ...to here | <------+ | 'socksetnonblock': event 103 | |tlsproxy/crypto-gnutls.c:110:16: | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ^ | | | | | (103) returning to 'socksetnonblock' from 'rpl_fcntl' | <------+ | 'tlssession_mainloop': events 104-109 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ~^ | | || | | |(104) returning to 'tlssession_mainloop' from 'socksetnonblock' | | (105) following 'false' branch... |...... | 312 | gnutls_transport_set_ptr(s->session, | | ~ | | | | | (106) ...to here |...... | 317 | if (ret < 0) { | | ~ | | | | | (107) following 'false' branch... |...... | 322 | if (socksetnonblock(cryptfd, 1) < 0) { | | ~ ~ | | | | | | | (109) calling 'socksetnonblock' from 'tlssession_mainloop' | | (108) ...to here | +--> 'socksetnonblock': events 110-111 | | 105 | static int socksetnonblock(int fd, int nb) | | ^ | | | | | (110) entry to 'socksetnonblock' | 106 | { | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ~ | | | | | (111) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 112-114 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (112) entry to 'rpl_fcntl' |...... | 211 | switch (action) | | ~ | | | | | (113) following 'default:' branch... |...... | 256 | default: | | ~ | | | | | (114) ...to here | 'rpl_fcntl': event 115 | |lto1: | (115): following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... | 'rpl_fcntl': event 116 | | 286 | case F_GETFD: | | ^ | | | | | (116) ...to here | <------+ | 'socksetnonblock': events 117-122 | |tlsproxy/crypto-gnutls.c:107:18: | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ^ | | | | | (117) returning to 'socksetnonblock' from 'rpl_fcntl' | 108 | if (sf == -1) | | ~ | | | | | (118) following 'false' branch... | 109 | return -1; | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ~ ~ | | | | | | | (120) following 'true' branch (when 'nb_8(D) != 0')... | | | (121) ...to here | | | (122) calling 'rpl_fcntl' from 'socksetnonblock' | | (119) ...to here | +--> 'rpl_fcntl': events 123-125 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (123) entry to 'rpl_fcntl' |...... | 211 | switch (action) | | ~ | | | | | (124) following 'default:' branch... |...... | 256 | default: | | ~ | | | | | (125) ...to here | 'rpl_fcntl': event 126 | |lto1: | (126): following 'case 2:, case 4:, case 8:, case 10:, case 1024:, case 1026:, case 1030 ... 1031:, case 1033:' branch... | 'rpl_fcntl': event 127 | | 332 | case F_ADD_SEALS: | | ^ | | | | | (127) ...to here | <------+ | 'socksetnonblock': event 128 | |tlsproxy/crypto-gnutls.c:110:16: | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ^ | | | | | (128) returning to 'socksetnonblock' from 'rpl_fcntl' | <------+ | 'tlssession_mainloop': events 129-132 | | 322 | if (socksetnonblock(cryptfd, 1) < 0) { | | ~^ | | || | | |(129) returning to 'tlssession_mainloop' from 'socksetnonblock' | | (130) following 'false' branch... |...... | 327 | if (socksetnonblock(plainfd, 1) < 0) { | | ~ ~ | | | | | | | (132) calling 'socksetnonblock' from 'tlssession_mainloop' | | (131) ...to here | +--> 'socksetnonblock': events 133-134 | | 105 | static int socksetnonblock(int fd, int nb) | | ^ | | | | | (133) entry to 'socksetnonblock' | 106 | { | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ~ | | | | | (134) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 135-137 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (135) entry to 'rpl_fcntl' |...... | 211 | switch (action) | | ~ | | | | | (136) following 'default:' branch... |...... | 256 | default: | | ~ | | | | | (137) ...to here | 'rpl_fcntl': event 138 | |lto1: | (138): following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... | 'rpl_fcntl': event 139 | | 286 | case F_GETFD: | | ^ | | | | | (139) ...to here | <------+ | 'socksetnonblock': events 140-145 | |tlsproxy/crypto-gnutls.c:107:18: | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ^ | | | | | (140) returning to 'socksetnonblock' from 'rpl_fcntl' | 108 | if (sf == -1) | | ~ | | | | | (141) following 'false' branch... | 109 | return -1; | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ~ ~ | | | | | | | (143) following 'true' branch (when 'nb_8(D) != 0')... | | | (144) ...to here | | | (145) calling 'rpl_fcntl' from 'socksetnonblock' | | (142) ...to here | +--> 'rpl_fcntl': events 146-148 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (146) entry to 'rpl_fcntl' |...... | 211 | switch (action) | | ~ | | | | | (147) following 'default:' branch... |...... | 256 | default: | | ~ | | | | | (148) ...to here | 'rpl_fcntl': event 149 | |lto1: | (149): following 'case 2:, case 4:, case 8:, case 10:, case 1024:, case 1026:, case 1030 ... 1031:, case 1033:' branch... | 'rpl_fcntl': event 150 | | 332 | case F_ADD_SEALS: | | ^ | | | | | (150) ...to here | <------+ | 'socksetnonblock': event 151 | |tlsproxy/crypto-gnutls.c:110:16: | 110 | return fcntl(fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK)); | | ^ | | | | | (151) returning to 'socksetnonblock' from 'rpl_fcntl' | <------+ | 'tlssession_mainloop': events 152-156 | | 327 | if (socksetnonblock(plainfd, 1) < 0) { | | ~^ | | || | | |(152) returning to 'tlssession_mainloop' from 'socksetnonblock' | | (153) following 'false' branch... |...... | 332 | maxfd = (plainfd > cryptfd) ? plainfd + 1 : cryptfd + 1; | | ~ | | | | | (154) ...to here | 333 | | 334 | while ((!plainEOF || !cryptEOF) && !quit(s)) { | | ~ ~ | | | | | | | (156) inlined call to 'quit' from 'tlssession_mainloop' | | (155) following 'true' branch (when 'plainEOF_83 == 0')... | +--> 'quit': event 157 | | 72 | return s->quitfn(s->opaque); | | ^ | | | | | (157) ...to here | <------+ | 'tlssession_mainloop': event 158 | | 334 | while ((!plainEOF || !cryptEOF) && !quit(s)) { | | ^ | | | | | (158) following 'true' branch... | 'tlssession_mainloop': event 159 | |lto1: | (159): ...to here | 'tlssession_mainloop': events 160-166 | | 340 | FD_ZERO(&readfds); | | ^ | | | | | (160) following 'true' branch (when '__i_90 != 16')... | | (161) ...to here | 341 | FD_ZERO(&writefds); | | ~ | | | | | (162) following 'true' branch (when '__i_91 != 16')... | | (163) ...to here |...... | 347 | if (plainEOF) { | | ~ | | | | | (164) following 'false' branch (when 'plainEOF_83 == 0')... |...... | 355 | if (!bufIsEmpty(cryptToPlain)) | | ~ ~ | | | | | | | (166) calling 'bufIsEmpty' from 'tlssession_mainloop' | | (165) ...to here | +--> 'bufIsEmpty': events 167-168 | |tlsproxy/buffer.c:185:5: | 185 | int bufIsEmpty(buffer_t *b) | | ^ | | | | | (167) entry to 'bufIsEmpty' | 186 | { | 187 | return b->empty; | | ~ | | | | | (168) 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); | ^ 'runlistener': events 1-2 | |tlsproxy/tlsproxy.c:214:12: | 214 | static int runlistener(void) | | ^ | | | | | (1) entry to 'runlistener' |...... | 217 | if ((listenfd = bindtoaddress(listenaddr)) < 0) { | | ~ | | | | | (2) calling 'bindtoaddress' from 'runlistener' | +--> 'bindtoaddress': events 3-13 | | 57 | static int bindtoaddress(char *addrport) | | ^ | | | | | (3) entry to 'bindtoaddress' |...... | 80 | if (s != 0) { | | ~ | | | | | (4) following 'false' branch... |...... | 88 | for (rp = result; rp != NULL; rp = rp->ai_next) { | | ~ ~ | | | | | | (5) ...to here (6) following 'true' branch (when 'rp_14' is non-NULL)... | 89 | fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); | | ~ ~ | | | | | | | (8) when 'socket' succeeds | | (7) ...to here | 90 | | 91 | if (fd >= 0) { | | ~ | | | | | (9) following 'true' branch (when 'fd_40 >= 0')... | 92 | int one = 1; | | ~ | | | | | (10) ...to here | 93 | if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, | | ~ | | | | | (11) following 'false' branch... |...... | 98 | if (bind(fd, rp->ai_addr, rp->ai_addrlen) == 0) | | ~ ~ | | | | | | | (13) following 'true' branch... | | (12) ...to here | 'bindtoaddress': event 14 | |lto1: | (14): ...to here | 'bindtoaddress': events 15-19 | | 83 | return -1; | | ~ | | | | | (19) ...to here |...... | 104 | if (!rp) { | | ^ | | | | | (15) following 'false' branch (when 'rp_29' is non-NULL)... |...... | 110 | freeaddrinfo(result); /* No longer needed */ | | ~ | | | | | (16) ...to here | 111 | | 112 | if (listen(fd, 5) < 0) { | | ~~ | | || | | |(17) when 'listen' succeeds | | (18) following 'false' branch... | <------+ | 'runlistener': events 20-21 | | 217 | if ((listenfd = bindtoaddress(listenaddr)) < 0) { | | ~ ^ | | | | | | | (20) returning to 'runlistener' from 'bindtoaddress' | | (21) following 'false' branch... | 'runlistener': event 22 | |lto1: | (22): ...to here | 'runlistener': event 23 | | 228 | while (!rxsigquit) { | | ^ | | | | | (23) following 'true' branch... | 'runlistener': event 24 | |lto1: | (24): ...to here | 'runlistener': events 25-29 | | 237 | if (rxsigquit) | | ^ | | | | | (25) following 'false' branch... | 238 | break; | 239 | if (nofork < 2) { | | ~ ~ | | | | | | | (27) following 'true' branch... | | (26) ...to here | 240 | int ret = runproxy(fd); | | ~ ~ | | | | | | | (29) calling 'runproxy' from 'runlistener' | | (28) ...to here | +--> 'runproxy': events 30-31 | | 178 | static int runproxy(int acceptfd) | | ^ | | | | | (30) entry to 'runproxy' |...... | 181 | if ((connectfd = connecttoaddress(connectaddr)) < 0) { | | ~ | | | | | (31) calling 'connecttoaddress' from 'runproxy' | +--> 'connecttoaddress': events 32-43 | | 120 | static int connecttoaddress(char *addrport) | | ^ | | | | | (32) entry to 'connecttoaddress' |...... | 146 | if (s != 0) { | | ~ | | | | | (33) following 'false' branch... |...... | 153 | for (rp = result; rp != NULL; rp = rp->ai_next) { | | ~ ~ | | | | | | (34) ...to here (35) following 'true' branch (when 'rp_14' is non-NULL)... | 154 | fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); | | ~ ~ | | | | | | | (37) when 'socket' succeeds | | (36) ...to here | 155 | if (fd >= 0) { | | ~ | | | | | (38) following 'true' branch (when 'fd_42 >= 0')... | 156 | if (connect(fd, rp->ai_addr, rp->ai_addrlen) == 0) | | ~ ~ | | | | | | | (40) following 'true' branch... | | (39) ...to here |...... | 162 | if (!rp) { | | ~ ~ | | | | | | | (42) following 'false' branch (when 'rp_28' is non-NULL)... | | (41) ...to here |...... | 168 | freeaddrinfo(result); /* No longer needed */ | | ~ | | | | | (43) ...to here | <------+ | 'runproxy': events 44-47 | | 181 | if ((connectfd = connecttoaddress(connectaddr)) < 0) { | | ~ ^ | | | | | | | (44) returning to 'runproxy' from 'connecttoaddress' | | (45) following 'false' branch... |...... | 187 | tlssession_t *session = tlssession_new(server, keyfile, certfile, | | ~ ~ | | | | | | (46) ...to here (47) calling 'tlssession_new' from 'runproxy' | +--> 'tlssession_new': events 48-64 | |tlsproxy/crypto-gnutls.c:163:15: | 163 | tlssession_t *tlssession_new(int isserver, char *keyfile, char *certfile, | | ^ | | | | | (48) entry to 'tlssession_new' |...... | 172 | if (!s) | | ~ | | | | | (49) following 'false' branch (when 's_36' is non-NULL)... |...... | 175 | if (quitfn) | | ~ ~ | | | | | | | (51) following 'true' branch (when 'quitfn_37(D)' is non-NULL)... | | (50) ...to here | 176 | s->quitfn = quitfn; | | ~ | | | | | (52) ...to here |...... | 180 | if (erroutfn) | | ~ | | | | | (53) following 'false' branch (when 'erroutfn_40(D)' is NULL)... |...... | 183 | s->erroutfn = stderrout; | | ~ | | | | | (54) ...to here |...... | 190 | if (gnutls_certificate_allocate_credentials(&s->creds) < 0) { | | ~ | | | | | (55) following 'false' branch... |...... | 195 | if (cacertfile != NULL) { | | ~ | | | | | (56) ...to here |...... | 232 | if (ret < 0) { | | ~ | | | | | (57) following 'false' branch (when 'ret_21 >= 0')... |...... | 238 | gnutls_session_set_ptr(s->session, (void *)s); | | ~ | | | | | (58) ...to here |...... | 251 | if (ret < 0) { | | ~ | | | | | (59) following 'false' branch... |...... | 257 | ret = gnutls_credentials_set(s->session, GNUTLS_CRD_CERTIFICATE, | | ~ | | | | | (60) ...to here | 258 | s->creds); | 259 | if (ret < 0) { | | ~ | | | | | (61) following 'false' branch... |...... | 265 | if (isserver) { | | ~ ~ | | | | | | | (63) following 'true' branch (when 'isserver_64(D) != 0')... | | (62) ...to here | 266 | /* requests but does not check a client certificate */ | 267 | gnutls_certificate_server_set_request(s->session, | | ~ | | | | | (64) ...to here | <------+ | 'runproxy': events 65-70 | |tlsproxy/tlsproxy.c:187:33: | 187 | tlssession_t *session = tlssession_new(server, keyfile, certfile, | | ^ | | | | | (65) returning to 'runproxy' from 'tlssession_new' |...... | 190 | if (!session) { | | ~ | | | | | (66) following 'false' branch... |...... | 197 | int ret; | | ~ | | | | | (67) ...to here | 198 | if (server) | | ~ | | | | | (68) following 'true' branch... | 199 | ret = tlssession_mainloop(acceptfd, connectfd, session); | | ~ ~ | | | | | | | (70) calling 'tlssession_mainloop' from 'runproxy' | | (69) ...to here | +--> 'tlssession_mainloop': events 71-72 | |tlsproxy/crypto-gnutls.c:293:5: | 293 | int tlssession_mainloop(int cryptfd, int plainfd, tlssession_t *s) | | ^ | | | | | (71) entry to 'tlssession_mainloop' |...... | 303 | buffer_t *plainToCrypt = bufNew(BUF_SIZE, BUF_HWM); | | ~ | | | | | (72) calling 'bufNew' from 'tlssession_mainloop' | +--> 'bufNew': events 73-76 | |tlsproxy/buffer.c:78:11: | 78 | buffer_t *bufNew(ssize_t size, ssize_t hwm) | | ^ | | | | | (73) entry to 'bufNew' | 79 | { | 80 | buffer_t *b = calloc(1, sizeof(buffer_t)); | | ~ | | | | | (74) allocated here | 81 | if (!b) | | ~ | | | | | (75) assuming 'b_6' is NULL | | (76) following 'true' branch (when 'b_6' is NULL)... | 'bufNew': event 77 | |lto1: | (77): ...to here | <------+ | 'tlssession_mainloop': events 78-79 | |tlsproxy/crypto-gnutls.c:303:34: | 303 | buffer_t *plainToCrypt = bufNew(BUF_SIZE, BUF_HWM); | | ^ | | | | | (78) returning to 'tlssession_mainloop' from 'bufNew' | 304 | buffer_t *cryptToPlain = bufNew(BUF_SIZE, BUF_HWM); | | ~ | | | | | (79) calling 'bufNew' from 'tlssession_mainloop' | +--> 'bufNew': events 80-81 | |tlsproxy/buffer.c:78:11: | 78 | buffer_t *bufNew(ssize_t size, ssize_t hwm) | | ^ | | | | | (80) entry to 'bufNew' |...... | 81 | if (!b) | | ~ | | | | | (81) following 'true' branch (when 'b_6' is NULL)... | 'bufNew': event 82 | |lto1: | (82): ...to here | <------+ | 'tlssession_mainloop': events 83-84 | |tlsproxy/crypto-gnutls.c:304:34: | 304 | buffer_t *cryptToPlain = bufNew(BUF_SIZE, BUF_HWM); | | ^ | | | | | (83) returning to 'tlssession_mainloop' from 'bufNew' | 305 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ~ | | | | | (84) calling 'socksetnonblock' from 'tlssession_mainloop' | +--> 'socksetnonblock': events 85-86 | | 105 | static int socksetnonblock(int fd, int nb) | | ^ | | | | | (85) entry to 'socksetnonblock' | 106 | { | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ~ | | | | | (86) calling 'rpl_fcntl' from 'socksetnonblock' | +--> 'rpl_fcntl': events 87-89 | |../../gl/fcntl.c:202:1: | 202 | fcntl (int fd, int action, /* arg */...) | | ^ | | | | | (87) entry to 'rpl_fcntl' |...... | 211 | switch (action) | | ~ | | | | | (88) following 'default:' branch... |...... | 256 | default: | | ~ | | | | | (89) ...to here | 'rpl_fcntl': event 90 | |lto1: | (90): following 'case 1:, case 3:, case 9:, case 11:, case 1025:, case 1032:, case 1034:' branch... | 'rpl_fcntl': event 91 | | 286 | case F_GETFD: | | ^ | | | | | (91) ...to here | <------+ | 'socksetnonblock': event 92 | |tlsproxy/crypto-gnutls.c:107:18: | 107 | int sf = fcntl(fd, F_GETFL, 0); | | ^ | | | | | (92) returning to 'socksetnonblock' from 'rpl_fcntl' | <------+ | 'tlssession_mainloop': events 93-96 | | 306 | if (socksetnonblock(cryptfd, 0) < 0) { | | ~^ | | || | | |(93) returning to 'tlssession_mainloop' from 'socksetnonblock' | | (94) following 'true' branch... | 307 | errout(s, "Could not turn on blocking: %m"); | | ~ | | | | | (95) ...to here |...... | 527 | bufFree(plainToCrypt); | | ~ | | | | | (96) calling 'bufFree' from 'tlssession_mainloop' | +--> 'bufFree': events 97-98 | |tlsproxy/buffer.c:91:6: | 91 | void bufFree(buffer_t *b) | | ^ | | | | | (97) entry to 'bufFree' | 92 | { | 93 | free(b->buf); | | ~ | | | | | (98) dereference of NULL 'b_3(D)' | make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc/examples' Making all in scripts make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc/scripts' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc/scripts' Making all in credentials make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc/credentials' Making all in srp make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc/credentials/srp' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc/credentials/srp' Making all in x509 make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc/credentials/x509' make[4]: Nothing to be done for 'all'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc/credentials/x509' make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc/credentials' make[4]: Nothing to be done for 'all-am'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc/credentials' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc/credentials' Making all in latex make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc/latex' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc/latex' make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/doc' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/doc' make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1' make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.1' ==> Starting check()... Making check in gl make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.1/gl' make check-recursive make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/gl' make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/gl' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/gl' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/gl' make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/gl' Making check in lib make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib' make check-recursive make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib' Making check in includes make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/includes' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/includes' Making check in x509 make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/x509' make check-am make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/x509' make[4]: Nothing to be done for 'check-am'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/x509' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/x509' Making check in auth make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/auth' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/auth' Making check in ext make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/ext' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/ext' Making check in algorithms make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/algorithms' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/algorithms' Making check in extras make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/extras' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/extras' Making check in accelerated make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/accelerated' make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/accelerated' make[4]: Nothing to be done for 'check-am'. make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/accelerated' make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/accelerated' Making check in nettle make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib/nettle' make[3]: Nothing to be done for 'check'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib/nettle' make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/lib' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib' make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib' make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/lib' Making check in extra make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.1/extra' Making check in includes make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/extra/includes' make[2]: Nothing to be done for 'check'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/extra/includes' make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/extra' make[2]: Nothing to be done for 'check-am'. make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/extra' make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/extra' Making check in po make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.1/po' make[1]: Nothing to be done for 'check'. make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/po' Making check in src/gl make[1]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl' make check-recursive make[2]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl' Making check in . make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl' make[3]: Nothing to be done for 'check-am'. make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl' Making check in tests make[3]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make check-recursive make[4]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' Making check in . make[5]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' ## ---------------------------------------------------------------------- ## ## ---------------------------- Gnulib tests ---------------------------- ## ## Please report test failures in this directory to . ## ## ---------------------------------------------------------------------- ## make test-accept test-alignasof test-alloca-opt test-arpa_inet test-array_list test-assert test-binary-io test-bind test-bitrotate test-byteswap test-c-ctype test-c-strcasecmp test-c-strncasecmp test-calloc-gnu test-canonicalize-lgpl test-cloexec test-close test-connect test-ctype test-dup2 test-environ test-errno test-error test-explicit_bzero test-fcntl-h test-fcntl test-fdopen test-fgetc test-float test-fopen-gnu test-fopen test-fpending test-fputc test-fread test-free test-fseek test-fseeko test-fseeko3 test-fseeko4 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-gettimeofday test-scratch-buffer test-hash test-ignore-value test-inet_ntop test-inet_pton test-intprops test-inttostr test-inttypes test-ioctl test-isblank test-langinfo test-limits-h test-linked_list test-linkedhash_list test-listen test-locale test-localename test-rwlock1 test-lock test-once1 test-once2 test-lseek test-lstat test-malloc-gnu test-malloca test-memchr test-memset_explicit test-nanosleep test-netdb test-netinet_in test-nstrftime test-open test-parse-datetime test-pathmax test-perror test-perror2 test-pipe test-pselect test-pthread test-pthread-thread test-pthread_sigmask1 test-pthread_sigmask2 test-raise test-rawmemchr test-read-file test-readlink test-realloc-gnu test-reallocarray test-recv test-recvfrom test-sched test-select test-select-fd test-select-stdin test-send test-sendto test-setenv test-setlocale_null test-setlocale_null-mt-one test-setlocale_null-mt-all test-setlocale1 test-setlocale2 test-setsockopt test-shutdown test-signal-h test-sigprocmask test-sleep test-snprintf test-sockets test-stat test-stat-time test-stdbool test-stdckdint test-stddef test-stdint test-stdio test-stdlib test-strerror test-strerror_r test-string test-strings test-strnlen test-strtoll test-strverscmp test-symlink test-sys_ioctl test-sys_select test-sys_socket test-sys_stat test-sys_time test-sys_types test-sys_uio test-thread_self test-thread_create test-time test-timespec test-tls test-unistd test-unsetenv test-usleep test-vasnprintf test-vasprintf test-verify test-vsnprintf test-wchar test-xalloc-die libtests.a make[6]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' CC test-accept.o CC gl_array_list.o CC binary-io.o CC dtotimespec.o CC hash-pjw.o CC imaxtostr.o CC inttostr.o CC offtostr.o CC uinttostr.o CC umaxtostr.o CC ioctl.o CC localename.o CC localename-table.o CC nanosleep.o CC setlocale_null.o CC glthread/thread.o CC timespec-add.o CC timespec-sub.o CC vma-iter.o CC strerror_r.o AR libtests.a CCLD test-accept CC test-alignasof.o CCLD test-alignasof CC test-alloca-opt.o CCLD test-alloca-opt CC test-arpa_inet.o CCLD test-arpa_inet CC test-array_list.o CCLD test-array_list CC test-assert.o CCLD test-assert CC test-binary-io.o CCLD test-binary-io CC test-bind.o CCLD test-bind CC test-bitrotate.o CCLD test-bitrotate CC test-byteswap.o CCLD test-byteswap CC test-c-ctype.o CCLD test-c-ctype CC test-c-strcasecmp.o CCLD test-c-strcasecmp CC test-c-strncasecmp.o CCLD test-c-strncasecmp CC test-calloc-gnu.o CCLD test-calloc-gnu CC test-canonicalize-lgpl.o CCLD test-canonicalize-lgpl CC test-cloexec.o CCLD test-cloexec CC test-close.o CCLD test-close CC test-connect.o CCLD test-connect CC test-ctype.o CCLD test-ctype CC test-dup2.o CCLD test-dup2 CC test-environ.o CCLD test-environ CC test-errno.o CCLD test-errno CC test-error.o CCLD test-error CC test-explicit_bzero.o CCLD test-explicit_bzero CC test-fcntl-h.o CCLD test-fcntl-h CC test-fcntl.o CCLD test-fcntl CC test-fdopen.o CCLD test-fdopen CC test-fgetc.o CCLD test-fgetc CC test-float.o CCLD test-float CC test-fopen-gnu.o CCLD test-fopen-gnu CC test-fopen.o CCLD test-fopen CC test-fpending.o CCLD test-fpending CC test-fputc.o CCLD test-fputc CC test-fread.o CCLD test-fread CC test-free.o CCLD test-free CC test-fseek.o CCLD test-fseek CC test-fseeko.o CCLD test-fseeko CC test-fseeko3.o CCLD test-fseeko3 CC test-fseeko4.o CCLD test-fseeko4 CC test-fstat.o CCLD test-fstat CC test-ftell.o CCLD test-ftell CC test-ftell3.o CCLD test-ftell3 CC test-ftello.o CCLD test-ftello CC test-ftello3.o CCLD test-ftello3 CC test-ftello4.o CCLD test-ftello4 CC test-ftruncate.o CCLD test-ftruncate CC test-func.o CCLD test-func CC test-fwrite.o CCLD test-fwrite CC test-getaddrinfo.o CCLD test-getaddrinfo CC test-getcwd-lgpl.o CCLD test-getcwd-lgpl CC test-getdelim.o CCLD test-getdelim CC test-getdtablesize.o CCLD test-getdtablesize CC test-getline.o CCLD test-getline CC test-getpeername.o CCLD test-getpeername CC test-getprogname.o CCLD test-getprogname CC test-gettimeofday.o CCLD test-gettimeofday CC test-scratch-buffer.o CCLD test-scratch-buffer CC test-hash.o CCLD test-hash CC test-ignore-value.o CCLD test-ignore-value CC test-inet_ntop.o CCLD test-inet_ntop CC test-inet_pton.o CCLD test-inet_pton CC test-intprops.o CCLD test-intprops CC test-inttostr.o CCLD test-inttostr CC test-inttypes.o CCLD test-inttypes CC test-ioctl.o CCLD test-ioctl CC test-isblank.o CCLD test-isblank CC test-langinfo.o CCLD test-langinfo CC test-limits-h.o CCLD test-limits-h CC test-linked_list.o CCLD test-linked_list CC test-linkedhash_list.o CCLD test-linkedhash_list CC test-listen.o CCLD test-listen CC test-locale.o CCLD test-locale CC test-localename.o CCLD test-localename CC test-rwlock1.o CCLD test-rwlock1 CC test-lock.o CCLD test-lock CC test-once.o CCLD test-once1 CCLD test-once2 CC test-lseek.o CCLD test-lseek CC test-lstat.o CCLD test-lstat CC test-malloc-gnu.o CCLD test-malloc-gnu CC test-malloca.o CCLD test-malloca CC test-memchr.o CCLD test-memchr CC test-memset_explicit.o CCLD test-memset_explicit CC test-nanosleep.o CCLD test-nanosleep CC test-netdb.o CCLD test-netdb CC test-netinet_in.o CCLD test-netinet_in CC test-nstrftime.o CCLD test-nstrftime CC test-open.o CCLD test-open CC test-parse-datetime.o CCLD test-parse-datetime CC test-pathmax.o CCLD test-pathmax CC test-perror.o CCLD test-perror CC test-perror2.o CCLD test-perror2 CC test-pipe.o CCLD test-pipe CC test-pselect.o CCLD test-pselect CC test-pthread.o CCLD test-pthread CC test-pthread-thread.o CCLD test-pthread-thread CC test-pthread_sigmask1.o CCLD test-pthread_sigmask1 CC test-pthread_sigmask2.o CCLD test-pthread_sigmask2 CC test-raise.o CCLD test-raise CC test-rawmemchr.o CCLD test-rawmemchr CC test-read-file.o CCLD test-read-file CC test-readlink.o CCLD test-readlink CC test-realloc-gnu.o CCLD test-realloc-gnu CC test-reallocarray.o CCLD test-reallocarray CC test-recv.o CCLD test-recv CC test-recvfrom.o CCLD test-recvfrom CC test-sched.o CCLD test-sched CC test-select.o CCLD test-select CC test-select-fd.o CCLD test-select-fd CC test-select-stdin.o CCLD test-select-stdin CC test-send.o CCLD test-send CC test-sendto.o CCLD test-sendto CC test-setenv.o CCLD test-setenv CC test-setlocale_null.o CCLD test-setlocale_null CC test-setlocale_null-mt-one.o CCLD test-setlocale_null-mt-one CC test-setlocale_null-mt-all.o CCLD test-setlocale_null-mt-all CC test-setlocale1.o CCLD test-setlocale1 CC test-setlocale2.o CCLD test-setlocale2 CC test-setsockopt.o CCLD test-setsockopt CC test-shutdown.o CCLD test-shutdown CC test-signal-h.o CCLD test-signal-h CC test-sigprocmask.o CCLD test-sigprocmask CC test-sleep.o CCLD test-sleep CC test-snprintf.o CCLD test-snprintf CC test-sockets.o CCLD test-sockets CC test-stat.o CCLD test-stat CC test-stat-time.o CCLD test-stat-time CC test-stdbool.o CCLD test-stdbool CC test-stdckdint.o CCLD test-stdckdint CC test-stddef.o CCLD test-stddef CC test-stdint.o CCLD test-stdint CC test-stdio.o CCLD test-stdio CC test-stdlib.o CCLD test-stdlib CC test-strerror.o CCLD test-strerror CC test-strerror_r.o CCLD test-strerror_r CC test-string.o CCLD test-string CC test-strings.o CCLD test-strings CC test-strnlen.o CCLD test-strnlen CC test-strtoll.o CCLD test-strtoll CC test-strverscmp.o CCLD test-strverscmp CC test-symlink.o CCLD test-symlink CC test-sys_ioctl.o CCLD test-sys_ioctl CC test-sys_select.o CCLD test-sys_select CC test-sys_socket.o CCLD test-sys_socket CC test-sys_stat.o CCLD test-sys_stat CC test-sys_time.o CCLD test-sys_time CC test-sys_types.o CCLD test-sys_types CC test-sys_uio.o CCLD test-sys_uio CC test-thread_self.o CCLD test-thread_self CC test-thread_create.o CCLD test-thread_create CC test-time.o CCLD test-time CC test-timespec.o CCLD test-timespec CC test-tls.o CCLD test-tls CC test-unistd.o CCLD test-unistd CC test-unsetenv.o CCLD test-unsetenv CC test-usleep.o CCLD test-usleep CC test-vasnprintf.o CCLD test-vasnprintf CC test-vasprintf.o CCLD test-vasprintf CC test-verify.o CCLD test-verify CC test-vsnprintf.o CCLD test-vsnprintf CC test-wchar.o CCLD test-wchar CC test-xalloc-die.o CCLD test-xalloc-die make[6]: 'libtests.a' is up to date. make[6]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make check-TESTS make[6]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[7]: Entering directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' PASS: test-accept PASS: test-alignasof PASS: test-alloca-opt PASS: test-arpa_inet PASS: test-array_list PASS: test-assert PASS: test-binary-io.sh PASS: test-bind PASS: test-bitrotate PASS: test-byteswap PASS: test-c-ctype PASS: test-c-strcase.sh PASS: test-calloc-gnu PASS: test-canonicalize-lgpl PASS: test-cloexec PASS: test-close PASS: test-connect PASS: test-ctype PASS: test-dup2 PASS: test-environ PASS: test-errno PASS: test-error.sh PASS: test-explicit_bzero PASS: test-fcntl-h PASS: test-fcntl PASS: test-fdopen PASS: test-fgetc PASS: test-float PASS: test-fopen-gnu PASS: test-fopen PASS: test-fpending.sh PASS: test-fputc PASS: test-fread FAIL: test-free PASS: test-fseek.sh PASS: test-fseek2.sh PASS: test-fseeko.sh PASS: test-fseeko2.sh PASS: test-fseeko3.sh PASS: test-fseeko4.sh PASS: test-fstat PASS: test-ftell.sh PASS: test-ftell2.sh PASS: test-ftell3 PASS: test-ftello.sh PASS: test-ftello2.sh PASS: test-ftello3 PASS: test-ftello4.sh PASS: test-ftruncate.sh PASS: test-func PASS: test-fwrite PASS: test-getaddrinfo PASS: test-getcwd-lgpl PASS: test-getdelim PASS: test-getdtablesize PASS: test-getline PASS: test-getpeername PASS: test-getprogname PASS: test-gettimeofday PASS: test-scratch-buffer PASS: test-hash PASS: test-ignore-value PASS: test-inet_ntop PASS: test-inet_pton PASS: test-intprops PASS: test-inttostr PASS: test-inttypes PASS: test-ioctl PASS: test-isblank PASS: test-langinfo PASS: test-limits-h PASS: test-linked_list PASS: test-linkedhash_list PASS: test-listen PASS: test-locale PASS: test-localename PASS: test-rwlock1 PASS: test-lock PASS: test-once1 PASS: test-once2 PASS: test-lseek.sh PASS: test-lstat PASS: test-malloc-gnu PASS: test-malloca PASS: test-memchr PASS: test-memset_explicit PASS: test-nanosleep PASS: test-netdb PASS: test-netinet_in PASS: test-nstrftime PASS: test-open PASS: test-parse-datetime PASS: test-pathmax PASS: test-perror.sh PASS: test-perror2 PASS: test-pipe PASS: test-pselect PASS: test-pthread PASS: test-pthread-thread PASS: test-pthread_sigmask1 PASS: test-pthread_sigmask2 PASS: test-raise PASS: test-rawmemchr PASS: test-read-file PASS: test-readlink PASS: test-realloc-gnu PASS: test-reallocarray PASS: test-recv PASS: test-recvfrom PASS: test-sched PASS: test-select PASS: test-select-in.sh PASS: test-select-out.sh PASS: test-send PASS: test-sendto PASS: test-setenv PASS: test-setlocale_null SKIP: test-setlocale_null-mt-one SKIP: test-setlocale_null-mt-all SKIP: test-setlocale1.sh PASS: test-setlocale2.sh PASS: test-setsockopt PASS: test-shutdown PASS: test-signal-h PASS: test-sigprocmask PASS: test-sleep PASS: test-snprintf PASS: test-sockets PASS: test-stat PASS: test-stat-time PASS: test-stdbool PASS: test-stdckdint PASS: test-stddef PASS: test-stdint PASS: test-stdio PASS: test-stdlib PASS: test-strerror PASS: test-strerror_r PASS: test-string PASS: test-strings PASS: test-strnlen PASS: test-strtoll PASS: test-strverscmp PASS: test-symlink PASS: test-sys_ioctl PASS: test-sys_select PASS: test-sys_socket PASS: test-sys_stat PASS: test-sys_time PASS: test-sys_types PASS: test-sys_uio PASS: test-init.sh PASS: test-thread_self PASS: test-thread_create PASS: test-time PASS: test-timespec PASS: test-tls PASS: test-unistd PASS: test-unsetenv PASS: test-usleep PASS: test-vasnprintf PASS: test-vasprintf PASS: test-verify PASS: test-verify.sh PASS: test-vsnprintf PASS: test-wchar PASS: test-xalloc-die.sh ============================================================================ Testsuite summary for GnuTLS 3.8.1 ============================================================================ # TOTAL: 167 # PASS: 163 # SKIP: 3 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 ============================================================================ See src/gl/tests/test-suite.log Please report to bugs@gnutls.org ============================================================================ make[7]: *** [Makefile:5011: test-suite.log] Error 1 make[7]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[6]: *** [Makefile:5119: check-TESTS] Error 2 make[6]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[5]: *** [Makefile:6379: check-am] Error 2 make[5]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[4]: *** [Makefile:4903: check-recursive] Error 1 make[4]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[3]: *** [Makefile:6381: check] Error 2 make[3]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl/tests' make[2]: *** [Makefile:3949: check-recursive] Error 1 make[2]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl' make[1]: *** [Makefile:4100: check] Error 2 make[1]: Leaving directory '/build/gnutls/src/gnutls-3.8.1/src/gl' make: *** [Makefile:2324: check-recursive] Error 1 ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/root29/build receiving incremental file list gnutls-3.8.1-2-riscv64-build.log gnutls-3.8.1-2-riscv64-check.log sent 62 bytes received 1,309,595 bytes 873,104.67 bytes/sec total size is 23,490,351 speedup is 17.94